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
5
SQL_QUERIES__1_.pdf
Manisha Rai
March 28, 2022
Tweet
Share
More Decks by Manisha Rai
See All by Manisha Rai
MANISHA
manisha27
0
20
ANALYTICS_IN_TELECOM_INDUSTRY.pdf
manisha27
0
46
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Pragmatic Product Professional
lauravandoore
33
6.6k
Product Roadmaps are Hard
iamctodd
PRO
52
11k
How to Think Like a Performance Engineer
csswizardry
23
1.5k
It's Worth the Effort
3n
184
28k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
How GitHub (no longer) Works
holman
314
140k
RailsConf 2023
tenderlove
30
1.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
540
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
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