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
8
SQL_QUERIES__1_.pdf
Manisha Rai
March 28, 2022
Tweet
Share
More Decks by Manisha Rai
See All by Manisha Rai
MANISHA
manisha27
0
23
ANALYTICS_IN_TELECOM_INDUSTRY.pdf
manisha27
0
56
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
303
21k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Scaling GitHub
holman
463
140k
For a Future-Friendly Web
brad_frost
180
10k
Embracing the Ebb and Flow
colly
88
4.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Done Done
chrislema
185
16k
Balancing Empowerment & Direction
lara
5
700
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
GitHub's CSS Performance
jonrohan
1032
470k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
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