Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting Information Systems

Authors: Marshall B. Romney, Paul J. Steinbart

13th edition

133428532, 978-0133428537

More Books

Students also viewed these Databases questions

Question

What is learning?

Answered: 1 week ago

Question

25.0 m C B A 52.0 m 65.0 m

Answered: 1 week ago