Question: Fred Smith started an online textbook store in 2 0 2 3 . As Fred's friend, you created the following relational database: Instructions: Use the
Fred Smith started an online textbook store in As Fred's friend, you created the following relational database: Instructions:
Use the following template to complete required items of this problem
Write your answer like a programmer ie exact spellings, specific commands, etc.
Extra space ie rows have been added
Upload your completed template into the homework assignment in Connect.
Please be sure to include your name above overwrite the blue font
Potential hint: If you believe you have multiple "WHERE" criteria, you can use operators such as "AND", OR
SQL query
SQL query
SQL query
Additional data dictionary information:
Author table: the Author ID attribute is numeric while the remaining attributes are text.
AuthorBook table: both fields are numeric.
Book table: the Book ID and Year attributes are numeric while the remaining four attributes are text. The Area attribute represents the subject area eg accounting, biology, chemistry, economics, finance, etc.
SalesLineItem table: The Sales Date attribute's data type is datetime the Customer ID Book ID and Quantity attributes are numeric, while the Unit Price attribute is currency.
Customer table: the Customer ID attribute is numeric while the remaining attributes are text.
Using the attached template, write three SQL queries that will return:
The average unit price of all sales for each different subject area.
The total quantity of books sold to each customer. The query output should also include the customers' name information and email address. Customers who purchased the largest quantities should appear first, while customers who purchased the fewest quantities should appear last.
A list providing the number of sales transactions, total quantity sold, and the average unit price, by publisher, for the calendar fourth quarter of The list should be sorted alphabetically by publisher.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
