Question
Customer: Ssn*,first_name,last_name,phone,email Invoice: Invoice_no*,invoice_date,ssn* Item: sku, item_name, price, vendor_id invoice item: invoice_no, sku vendor: vendor_id*, vendor_name, vendor_phone, vendor_email, vendor_size Whats a SQL query
Customer:
Ssn*,first_name,last_name,phone,email
Invoice:
Invoice_no*,invoice_date,ssn*
Item:
sku, item_name, price, vendor_id
invoice item:
invoice_no, sku
vendor:
vendor_id*, vendor_name, vendor_phone, vendor_email, vendor_size
Whats a SQL query that shows the total combined price of all invoices of customers whose last name starts with the letter D. Display each customer last name and the total price of their invoices (Total Price of Orders). Show the results with the highest total invoice price first.
Whats a SQL query that determines the most expensive item purchased in each invoice (Item Price). Display the invoice number, the date of the invoice, the last name of the customer that received the invoice, and the price of the most expensive item on that invoice. Display in alphabetical order by last name.
Whats a SQL query that determines and displays the total price of items sold (Total Price) after and including June 21st, 2020.
Whats a SQL query that determines the number of items purchased by each customer in the year 2020. Display the last name of each customer and the number of items purchased by each customer in that year in alphabetical order by last name.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started