commit 8b259d817ee9bde1a2f8a7236de9311610588dfe Author: noah Date: Tue Aug 30 18:33:01 2022 -0500 README diff --git a/README.md b/README.md new file mode 100644 index 0000000..40da840 --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +# Case Study 1 + +## Instructions + +- Use the Cape\_Codd database +- Use only the Inventory table +- Deliver a single sql file +- Each query should start with a comment line that looks like: + /* *** CS1-\ *** \*/ + Example for Exercies 2.17: + /* *** CS1-2.17*** */ +- Do not include the result table unless specifically directed to +- Include at least one line of white space between answers + +## Exercises 2.17 - 2.33 + +2.17) Write an SQL statement to display SKU and SKU\_Description. + +2.18) Write an SQL statement to display SKU\_Description and SKU. + +2.19) Write an SQL statement to display WarehouseID. + +2.20) Write an SQL statement to display unique WarehouseIDs. + +2.21) Write an SQL statement to display all of the columns without using the SQL asterisk (wildcard character). + +2.22) Write an SQL statement to display all of the columns using the SQL asterisk (wildcard character) + +2.23) Write an SQL statement to display all data on products having a QuantityOnHand greater than 0. + +2.24) Write an SQL statement to display the SKU and SKU\_Description for products having QuantityOnHand equal to 0. + +2.25) Write an SQL statement to display the SKU, SKU\_Description, and WarehouseID for products that have a QuantityOnHand equal to 0. Sort the results in ascending order by WarehouseID. + +2.26) Write an SQL statement to display the SKU, SKU\_Description, and WarehouseID for products that have a QuantityOnHand greater than 0. Sort the results in descending order by WarehouseID and in ascending order by SKU. + +2.27) Write an SQL statement to display SKU, SKU\_Description, and WarehouseID for all products that have a QuantityOnHand equal to 0 and a QuantityOnOrder greater than 0. Sort the results in descending order by WarehouseID and in ascending order by SKU. + +2.28) Write an SQL statement to display SKU, SKU\_Description, and WarehouseID for all products that have a QuantityOnHand equal to 0 or a QuantityOnOrder equal to 0. Sort the results in descending order by WarehouseID and in ascending order by SKU. + +2.29) Write an SQL statement to display the SKU, SKU\_Description, WarehouseID, and QuantityOnHand for all products having a QuantityOnHand greater than 1 and less than 10. Do not use the BETWEEN keyword. + +2.30) Write an SQL statement to display the SKU, SKU\_Description, WarehouseID, and QuantityOnHand for all products having a QuantityOnHand greater than 1 and less than 10. Use the BETWEEN keyword. + +2.31) Write an SQL statement to show a unique SKU and SKU\_Description for all products with an SKU description starting with ‘Half-Dome’. + +2.32) Write an SQL statement to show a unique SKU and SKU\_Description for all products with a description that includes the word ‘Climb’. + +2.33) Write an SQL statement to show a unique SKU and SKU\_Description for all products with a ‘d’ in the third position from the left in SKU\_Description. + +