Answered step by step
Verified Expert Solution
Question
1 Approved Answer
E 5 . 1 . 2 2 Display the ProductID and ProductName of the product for the products whose total quantity sold in all transactions
E Display the ProductID and ProductName of the product for the products whose total quantity sold in all transactions
is greater than Sort the results by ProductID.
E Rewrite Query using a join statement no nested queries Query text: For each product that has more than three items
sold within all
sales transactions, retrieve the product ID product name, and
product price
Query : SELECT productid, productname, productprice
FROM product
WHERE productid IN
SELECT productid
FROM includes
GROUP BY productid
HAVING SUMquantity;
E Rewrite Query using a join statement no nested queries Query text: For each product whose items were sold in more
than one sales transaction, retrieve the product id product
name and
product price
Query : SELECT productid, productname, productprice
FROM product
WHERE productid IN
SELECT productid
FROM includes
GROUP BY productid
HAVING COUNT;
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