Question: Create SQL queries on your database based on the following requirements: 1. Determine the Total Sales to each customer and profit generated from each customer.
Create SQL queries on your database based on the following requirements:
1. Determine the Total Sales to each customer and profit generated from each customer. List CustID, LastName, FirstName, TotalSales and TotalProfit.
2. Display ISBN and Title of each book written by multiple authors.
3. Determine ShipCity and ShipState with Highest total Sales [SUM(QUANTITY*Retail)]. Display ShipCity, ShipState and Total Sales.
4. Display Last Name & First Name of Authors who has the same last name of a Customer.
5. What is the retail price of the least expensive Cooking book? Display ISBN, Title and Retail price of the book.

ERD of JustLeeBooksDatabase Orders BOOKAUTHOR 8 CustiD 8 OrderlD ISBN 8 AuthorlD CustD State Author ShipState AuthorlD ORDERITEMS Order D Fname ISBN promotion Books ISBN PubDate PubiD Cost PublD Contact Phone Category
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
