Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SQL_QUERIES__1_.pdf
Search
Manisha Rai
March 28, 2022
0
4
SQL_QUERIES__1_.pdf
Manisha Rai
March 28, 2022
Tweet
Share
More Decks by Manisha Rai
See All by Manisha Rai
MANISHA
manisha27
0
19
ANALYTICS_IN_TELECOM_INDUSTRY.pdf
manisha27
0
44
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
36
1.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
12
1.4k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
8
700
Building Applications with DynamoDB
mza
94
6.3k
Code Review Best Practice
trishagee
67
18k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Cost Of JavaScript in 2023
addyosmani
48
7.6k
GitHub's CSS Performance
jonrohan
1030
460k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
470
Transcript
SQL QUERIES 1)select top 10* from [DataDB].[dbo].['sample-csv-file-for-testing$'] ORDER BY[ Gross
Sales ] DESC 2) select top 3 *from [DataDB].[ dbo].['sample-csv-file-for-testing$'] 3) select top 5* from [DataDB].[dbo].['sample-csv-file-for-testing$']ORDER BY [ Profit ] DESC;
4) select Country, SUM([ Sales ]) TOTAL_Sales From [DataDB].[dbo].['sample-csv-file-for-testing$'] GROUP
BY Country
5) select Country, SUM([ Profit ]) TOTAL_Profit from [DataDB].[dbo].['sample-csv-file-for-testing$'] GROUP
BY Country
6) select Segment, SUM([ Sales ]) TOTAL_Sales from [DataDB].[dbo].['sample-csv-file-for-testing$'] GROUP
BY Segment ORDER BY TOTAL_Sales DESC; 7) select Segment, SUM([ Sales ]) TOTAL_Sales from [DataDB].[dbo].['sample-csv-file-for-testing$'] GROUP BY Segment having SUM([ Sales ])>2000000 ORDER BY TOTAL_Sales DESC;
8)select * from dbo.['Table 2$'] LEFT JOIN dbo.['Table 1$']on dbo.['Table
2$'].[ Sales ]=dbo.['Table 1$'].[ Sales ] 9) select*from dbo.['Table 2$']RIGHT JOIN dbo.['Table 1$']on dbo.['Table 2$'].Country=dbo.['Table 1$'].Country
10)select *from dbo.['Table 2$']FULL OUTER JOIN dbo.['Table 1$']on dbo.['Table 2$'].[Units
Sold]=dbo.['Table 1$'].[Units Sold]
None