Hands-on Assignments To perform these assignments, refer to the tables in the Ju
ID: 3816179 • Letter: H
Question
Hands-on Assignments To perform these assignments, refer to the tables in the JustLee Books database. 1. Determine how many books are in the cooking category. 2. Display the number of books with a retail price of more than $30.00. 3. Display the most recent publication date of all books sold by JustLee Books. Determine the total profit generated by sales to customer 1017. Note: Quantity should be 4. reflected in the total profit calculation. 5. List the retail price of the least expensive book in the Computer category. 6. Determine the average profit generated by orders in the ORDERS table. Note: The total profit by order must be calculated before finding the average profit.Explanation / Answer
the answer of the following question are as below
1. we need to select count of books where category is cooking
SELECT COUNT * FROM books WHERE category = 'COOKING';
2. we need count of books where retail price is more than 30
SELECT COUNT(*) FROM books WHERE retail > 30;
3.for recent the publishing date is max
SELECT MAX( publishdate) FROM books WHERE vendor ="justLee";
4.total profit by customer 1017 is
SELECT SUM((ret-cost)*quantity) FROM orders JOIN orderitems USING(order#) WHERE customer = 1017;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.