Learn Data Presentation Through Practice
Practice Distinct, stored procedures and views in this lesson.
We'll cover the following...
Problem
Refer to the “Sales.ProductSales” table to solve the problems presented in this lesson.
Sales.ProductSales Table
TransactionID | ProductID | UnitPrice | Quantity | CustomerID | Supt_PkgID | Supt_PkgCost |
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 |
Part A
Let’s suppose there is a need to create a query for an end user so that they can see some basic information. Write a query that obtains the following information and uses aliases for each:
ProductID
: This should be an accidental alias with no spaces or underscores and be calledModuleId
.
Access this course and 1400+ top-rated courses and projects.