From 119d465d21253acf82b55917f456bdc1c2d7e97b Mon Sep 17 00:00:00 2001 From: askiiart Date: Thu, 1 Feb 2024 18:24:02 -0600 Subject: [PATCH] Update instructions --- .../database-programming/lab-1/instructions.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename instructions/database-programming/lab-1.md => labs/database-programming/lab-1/instructions.md (92%) 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.