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

Hello, I need help with my SQL queries to see if they answer the following quest

ID: 3848574 • Letter: H

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 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

Explanation / Answer

1.   SELECT count(bookname) FROM publisher WHERE [date] BETWEEN #2017/06/01# AND #2017/06/30#

2.   SELECT authorname FROM product WHERE publisher.[date] BETWEEN #2017/06/01# AND #2017/06/30# group by authorname

3.   SELECT bookname, authorname FROM product

4.   SELECT Count(products), products FROM product WHERE products != “book” order by products DESC

5.   SELECT name, city FROM customer WHERE zipcode = 2

6.   insert into TableName from (SELECT name, city, address, zipcode, orderdate.order FROM customer)

Note: As per your inputs above are the modified SQL queries. But, you have to more descriptive like table names, column names and your requirement.

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