Update instructions
This commit is contained in:
parent
2034b9602c
commit
119d465d21
1 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
|||
# Lab 1
|
||||
|
||||
*UPDATE: Scenario 5 should be `or`, not `and`.*
|
||||
|
||||
This lab has you practice simple queries against tables with filtering and ordering. Write the SQL queries that properly answer each scenario.
|
||||
|
||||
For each scenario include the following in your answer:
|
||||
|
@ -44,7 +46,7 @@ Rows: 147
|
|||
## Scenario 5
|
||||
|
||||
Select the `StockItemName`, `RecommendedRetailPrice` and `Tags` from the `Warehouse.StockItems` table.
|
||||
Include only the rows where `IsChillerStock` is true and `StockItemName` begins with `USB`.
|
||||
Include only the rows where `IsChillerStock` is true or `StockItemName` begins with `USB`.
|
||||
Order the rows by `StockItemName`.
|
||||
Only return the first 10 rows.
|
||||
|
||||
|
@ -53,14 +55,14 @@ Rows: 10
|
|||
## Scenario 6
|
||||
|
||||
Select the `InvoiceId`, `InvoiceDate` and `CustomerName` from the `Sales.Invoices` and `Sales.Customers` tables.
|
||||
Include only the invoices from `1/1/2016' to '3/1/2016' and customers that do not have`Toys` in the name.
|
||||
Include only the invoices from `1/1/2016` to `3/1/2016` and customers that do not have `Toys` in the name.
|
||||
Order the rows by `CustomerName` and then by `InvoiceDate`.
|
||||
|
||||
Rows: 1382
|
||||
|
||||
*Note: Return `CustomerName`, not `CustomerId`.
|
||||
|
||||
## Scenario 7*
|
||||
## Scenario 7
|
||||
|
||||
Select the `ColorName` columns from the `Warehouse.Colors` table that are not being used in the `Warehouse.StockItems` table.
|
||||
The `Warehouse.StockItems.ColorId` column contains the `Warehouse.Colors.ColorId` value.
|
Loading…
Reference in a new issue