Upload your study docs or become a
Course Hero member to access this document
Unformatted text preview: SUM((retail- cost)*quantity)FROM orders JOIN orderitems USING(order#) JOIN books USING(isbn)WHERE customer# = 1017; 5. List the retail price of the least expensive book in the Computer category. SELECT MIN(retail)FROM booksWHERE category = 'COMPUTER'; 6. Determine the average profit generated by orders in the ORDERS table. Note: The total profitby order must be calculated before finding the average profit. SELECT AVG(SUM((retail- cost)*quantity)) FROM orders JOIN orderitems USING(order#) JOIN books USING(isbn) GROUP BY order#;...
View
Full Document