Question: Based on this diagram and tables in it . What sql codes would answer these questions: give me code that would run in sql .

Based on this diagram and tables in it. What sql codes would answer these questions: give me code that would run in sql.
1. Give me the number of books published by each author under each publisher?
2. What is the order number, order date, user, and payment method of the largest checkout cart?
3. What is our total revenue gained from book purchases?
4. Give me only those for users aged over 30 with a valid favorite author? (Hint: Check if the DOB is after 1993-01-01)
5. Give me the total of each checkout cart where the user paid with their membershippoints?
**Example question: How many books has each author published?
The code would be:
Select author.firstName, author.lastName , count(book.author_id)
From author
Inner join book on book.author_id = author.author_id
Group by author.author_id
Order by count(book.author_id) desc;
Based on this diagram and tables in it . What sql

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!