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
18
ANALYTICS_IN_TELECOM_INDUSTRY.pdf
manisha27
0
42
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
960
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
GitHub's CSS Performance
jonrohan
1030
460k
Writing Fast Ruby
sferik
628
61k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.6k
Making the Leap to Tech Lead
cromwellryan
133
9k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.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