Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 PRODUCT_ID PRODUCT_NAME 50 Intel SSDPECME 0401401 2 56 Western Digital WD2500AAJS 3 94 Western Digital WD2500AVVS 133 PNY VCQP6000-PB 5 206 PNY VCQM6000-24GB-PB 6

image text in transcribed

1 PRODUCT_ID PRODUCT_NAME 50 Intel SSDPECME 0401401 2 56 Western Digital WD2500AAJS 3 94 Western Digital WD2500AVVS 133 PNY VCQP6000-PB 5 206 PNY VCQM6000-24GB-PB 6 256 Western Digital WD5000AACS CATEGORY_ID CATEGORY_NAME LIST_PRICE 5 Storage 8867.99 5 Storage 16.99 5 Storage 15.55 2 Video Card 5508.99 2 Video Card 4148 5 Storage 26.99 4 4. Write a SQL statement to display products in category 2 that have not been sold in any orders. Sort the result by product ID. Display the result exactly the same as the given output. STATUS 1 88 has not been sold. 2133 has not been sold. 3 161 has not been sold. 4 175 has not been sold. 5 221 has not been sold. 6 223 has not been sold. 7 267 has not been sold. 5. Display the product id, product name, warehouse id, warehouse name, and the quantity of products for all warehouses with the product quantity greater than 300. Sort the result by product ID. PRODUCT_ID PRODUCT_NAME 1 270 Gigabyte GV-N1070WF2OC-8GD 2 269 Zotac ZT-P10810D-10P 3 284 Kingston SA400S37/120G 4 284 Kingston SA400S37/120G WAREHOUSE_ID WAREHOUSE_NAME QUANTITY 3 New Jersey 304 3 New Jersey 304 6 Sydney 320 2 San Francisco 353 6. Create a view named customer_report to display customer ID, customer name, and order ID, order date, and order status for customers who have cancelled their orders. 7. Write a SQL statement to display the result of the customer_report view. Sort the output based on the customer number. Show orders that are placed after January 31, 2017. Sort the result by product ID from high to low. 1 2 CUSTOMER_ID NAME 46 Supervalu 45 CenturyLink 44 Jabil Circuit 6 Community Health Systems 5 Centene ORDER_ID ORDER_DATE STATUS 31 12-AUG-17 Canceled 70 21-FEB-17 Canceled 69 17-MAR-17 Canceled 28 15-AUG-17 Canceled 509-APR-17 Canceled 3 4 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions