Question
****Easy SQL questions, Will upvote:**** 1) Download the following MS SQL Query files: DBP-e14-MSSQL-Cape-Codd-Create-Tables.sql DBP-e14-MSSQL-Cape-Codd-Insert-Data.sql ---------------------- Download from here: https://drive.google.com/drive/folders/1IEx-YXYNTn8jDtigs30hKMoTg-dAmmmV?usp=sharing ---------------------- 2) In SQL Server
****Easy SQL questions, Will upvote:****
1) Download the following MS SQL Query files:
DBP-e14-MSSQL-Cape-Codd-Create-Tables.sql
DBP-e14-MSSQL-Cape-Codd-Insert-Data.sql
----------------------
Download from here:
https://drive.google.com/drive/folders/1IEx-YXYNTn8jDtigs30hKMoTg-dAmmmV?usp=sharing
----------------------
2) In SQL Server Management Studio, create a new database called Cape_Codd
3) From MS SQL Server Management Studio, click File Open File and select the Create-Tables file you downloaded.
4) Execute the Create Table script ONLY ONCE. If you try to re-execute, you get error message. Verify that the tables are created. Make sure you refresh the object explorer view. You should see five tables being created.
5) Repeat steps 3, 4, and 5 for the second file (Insert-Data) to populate the tables. Again, execute the script ONLY ONCE. If you try to re-execute, you get error messages. Verify that the tables are populated using Select Top 1000 Rows.
6) Now, using table INVENTORY, work the questions below. Write all SQL statements (only) in the same script and save into a text file called Ch2-Assignment2.sql.
For each answer, add a comment line right before it with the question number such as:
/* 2.23 */
---------------------------------------------------
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 (*) wild- card 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started