Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need to create the following queries using the tables below....... 1. How many

ID: 3667514 • Letter: I

Question

I need to create the following queries using the tables below.......

1. How many books are sold each month by the publisher? This is important because quantity discounts are available from the publisher.

2. Which authors are the biggest sellers of books in our stores? This is important because the publisher offers discounts for certain authors each month.

3. What books are associated with each publisher?

4. What are the most popular products besides books that are sold in each store? In addition to books, the stores sell magazines, café-specific products like coffee and pastries, and various gift products.

5. From what region(s) (by ZIP code) do customers visit our stores? This is important because it will assist with future marketing efforts.

6. What customer data must be stored for the e-commerce portion of the website?

Explanation / Answer

1)

select p.count(books),o.discount from product p joins orderdetails o where productType='book' and p.productid=o.orderid order by publisher;

2)

3)

select productname,publisher from product where productid='book';

4)

5)

select c.custname from customer c ,order o,ordrdetails od,product p where o.custid=c.id and o.orderid=od.orderid and p.productid=od.pid and p.storeid=' sss';

I considered store id as sss

6)

CREATE VIEW ecommercesite AS
SELECT custlastname, custaddress,custphone,custmail
FROM customer;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote