question archive ite a SQL query for each of the following data retrieval requirements based on the database 1 in class

ite a SQL query for each of the following data retrieval requirements based on the database 1 in class

Subject:Computer SciencePrice:9.82 Bought3

ite a SQL query for each of the following data retrieval requirements based on the database 1 in class . To create the database on your computer, please use the script Assignment4.sql Canvas . List ID, Name , and Price for all products with price greater than the average product price . SELECT Product_ID , Product_Name , Product_PRICE FROM PRODUCT WHERE PRICE >= (SELECT AVG(Product_PRICE) FROM PRODUCT); For each product , list its ID and total quantity ordered .Products are listed in ascending order of product_id For each product , list its ID and total quantity ordered .Products are listed in ascending order of total quantity ordered . For each product , list its ID, Name and total quantity ordered .Products are listed in ascending order of product_id List name for all customers , who have placed order (s) W Each customer name appears exactly once . Customer names are sorted in ascending alphabetical order . Use equal join for this query. Implement query 5 using IN and subquery and add the requirement that the custom ers' orders have been placed after 23-OCT-2008. For each city, list number of customers from the city, who have placed order(s). Cities are listed in ascending alphabetical order. Use equal join for this query. Implement query '7 using natural join . Implement query 7 using IN and subquery. List ID for all products, which have NOT been ordered since 28-OCT-2008. Sort your results by product_id in ascending order. Use Minus for this query. List ID for all Arizona customers, who have placed order(s) since 28-OCT-2008. Sort your results by cust_id in ascending order. Use Intersect for this query. Implement query 11 using IN and subquery. List ID for all California customers and all customers who have placed order (5) since 28- OCT-2008. Sort your results by cust_id in ascending order. Use Union for this query. List ID , Name and total quantity ordered for all products with total quantity ordered greater than 10. List ID, Name and total quantity ordered for all products , which have been ordered more than 6 by Utah customers

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

Step-by-step explanation

1/ select ids total quantity from product order by id " group by productorone . select id, total quantity from product order by total quantity group by productnome's 3 ) Select id, name, fatalquantity from product order by lid group by productrome,! my select chrome. from Celetomes , Order JOIN orders ON Customers . orderid 2 order ordernid AND orderplaced date > 23-10- 2008 5 Select Crome from customer , order where Customer. orderrid = orders. orderaid AND orderplaced IN ( select orderplaced from order where orderplaced date '23-10- 2008");

6/ Select Cityname , Count ( (nome) , Count (orderid) Join rom Cuefoment Vorders ON customere . orderid zorders.orderid group by cityname , Cname HAVING Count (orderrid) > = 1 , order by cityname Select Citynome, Count (chrome) , count (orderid ) from Customneed Join order ON Customere. orderid = order. orderid HAVING Count (orderid) IN ( Select Count (orderid) from orders HAVING Count Cordesid ) 2=1 ) order by citygames Select id from product MINUS Select orderdate < = '28/ 10 / 2008' Goders by id 9 ) Select id from Customers where city z 'arizona INTERSECT Select id from Cuetomend where orderdate ) = 128 / 10 / 2008 ., Select id from Cuetomere city IN ( select city from Customer where where city = ' arizona") HAVING orderdate ?' =28 /10 | 2008' 10 ) Select & from Customer where city =' california UNION Select orderdate from order where orderdate >= ' 28 /10 /2018) orders by cuet-id s

ly select idsrome, totalequantityordered troon product where fotel quantity ordered 2 10 12) Select ids
nome, totale,unfityodered from product, Candomore where totala, undityordered > 6 AND product .
Customerid a Custommeme. Customer id AND Chrome = Utah "