write SQL queries to create procedures for a database called Saleco. The database contains the following tables: customer, invoice, line, product, and vendor.  A procedure called get_customer_invoices that takes a customer ID as input and returns a list of all invoices for that customer, along with the total amount due for each invoice. A procedure called get_vendor_products that takes a vendor ID as input and returns a list of all products sold by that vendor, along with the number of units sold and the total revenue generated for each product. A procedure called get_invoice_details that takes an invoice ID as input and returns a list of all products purchased on that invoice, along with the quantity purchased, the unit price, and the total price for each product.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 10E
icon
Related questions
Question

write SQL queries to create procedures for a database called Saleco. The database contains the following tables: customer, invoice, line, product, and vendor

A procedure called get_customer_invoices that takes a customer ID as input and returns a list of all invoices for that customer, along with the total amount due for each invoice.

A procedure called get_vendor_products that takes a vendor ID as input and returns a list of all products sold by that vendor, along with the number of units sold and the total revenue generated for each product.

A procedure called get_invoice_details that takes an invoice ID as input and returns a list of all products purchased on that invoice, along with the quantity purchased, the unit price, and the total price for each product.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Intermediate SQL concepts
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning