diff --git a/instructions/database-programming/lab-1.md b/labs/database-programming/lab-1/instructions.md similarity index 92% rename from instructions/database-programming/lab-1.md rename to labs/database-programming/lab-1/instructions.md index 24dfac7..aeba745 100644 --- a/instructions/database-programming/lab-1.md +++ b/labs/database-programming/lab-1/instructions.md @@ -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.