Learn Aggregates and Joins Through Practice
Explore how to use SQL aggregate functions and joins by working with real data tables. Learn to write queries that summarize data and combine multiple tables to produce detailed reports. This lesson helps you develop practical skills to transform and present data effectively.
We'll cover the following...
We'll cover the following...
Problem
Please refer to the “Sales.ProductSales” and ...
Sales.ProductSales Table
TransactionID | ProductID | UnitPrice | Quantity | CustomerID | SuptPkgID | SuptPkgCost |
1 | 1 | 1000.00 | 1 | 1 | 1 | 0.00 |
2 | 1 | 1000.00 | 1 | 2 | 1 | 0.00 |
3 | 2 | 1500.00 | 2 | 3 | 2 | 250.00 |
4 | 3 | 750.00 | 1 | 4 | 2 | 250.00 |
5 | 4 | 2500.00 | 1 | 5 | 2 | 250.00 |
6 | 1 | 1000.00 | 1 | 5 | 2 | 250.00 |
Cust.Customers Table
CustomerID | CustomerName | FTPAddress |
1 | GeoStudy,Inc | ftp.geostudy.com |
2 | Weather Watchers | sftp.weatherinfo.com |
3 | GIS In Motion | ftp.gismotion.com |
4 | GIS Tracker | sftp.gistracking.com |
5 | Earth Mapping | sftp.emap.com |
...