Question: Hello, I need help with my SQL queries to see if they answer the following questions correctly A List of Proposed Queries 1. How many
Hello, I need help with my SQL queries to see if they answer the following questions correctly
A List of Proposed Queries
1. How many books are sold each month by the publisher? This is important because quantity discounts are available from the publisher.
SELECT bookname (count)
FROM publisher
WHERE date
BETWEEN 2017/06/01 AND 2017/06/30
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.
SELECT authorname (count), bookname
FROM product
WHERE date.publisher
BETWEEN 2017/06/01 AND 2017/06/30
3. What books are associated with each publisher?
SELECT authorname (count), bookname
FROM product
WHERE publisher.product = publishername.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.
SELECT products (count)
FROM product
WHERE products NOT = book AND products = MAX
5. From what region(s) (by ZIP code) do customers visit our stores? This is important because it will assist with future marketing efforts.
SELECT name, city,
FROM customer
WHERE zipcode = 2
6. What customer data must be stored for the e-commerce portion of the website?
SELECT name, city, address, , zipcode, orderdate.order,
FROM customer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
