Which of the following is a valid SQL statement?
A) SELECT SUM(quantity*retail) "Total Sales"
FROM orders JOIN orderitems ON orders.order# = orderitems.order#
JOIN books ON orderitems ON orderitems.ISBN = books.ISBN
WHERE orderdate = '02-APR-03';
B) SELECT SUM(quantity*retail) "Total Sales"
FROM orders JOIN orderitems ON orders.order# = orderitems.order#
JOIN books ON orderitems ON orderitems.ISBN = books.ISBN
HAVING orderdate = '02-APR-03';
C) SELECT customer#,SUM(quantity*retail) "Total Sales"
FROM orders JOIN orderitems ON orders.order# = orderitems.order#
JOIN books ON orderitems ON orderitems.ISBN = books.ISBN
HAVING orderdate = '02-APR-03';
D) SELECT customer#,SUM(quantity*retail) "Total Sales"
FROM orders JOIN orderitems ON orders.order# = orderitems.order#
JOIN books ON orderitems ON orderitems.ISBN = books.ISBN
HAVING orderdate = '02-APR-03'
GROUP BY customer#;
Correct Answer:
Verified
Q93: A group function can be nested inside
Q94: If the output is to be restricted
Q95: The _ function calculates the standard deviation
Q96: Group functions can be nested to a
Q97: Which of the following indicates the processing
Q99: If the DISTINCT keyword is not included
Q100: If a SELECT statement contains HAVING,GROUP BY,and
Q101: The _ function can be used to
Q102: Contents of the BOOKS table
Q103: What clause offers many options to identify
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents