Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SQL Consider the query shown. SELECT vendor id, invoice number, invoice total FROM invoices inv_main WHERE invoice total > (SELECT AVG(invoice_total) FROM invoices inv_sub WHERE
SQL
Consider the query shown. SELECT vendor id, invoice number, invoice total FROM invoices inv_main WHERE invoice total > (SELECT AVG(invoice_total) FROM invoices inv_sub WHERE inv sub.vendor id inv main.vendor id) ORDER BY vendor id, invoice total Write a buisness rule for this query. a.Make a list of all the invoices (vendor id, number, and total) where the total is greater than the average for that vendor. Put the list in order so that invoices from the same vendor are together in the list b. Make a list of all the invoices (vendor id, number, and total) where the total is greater than the average over all invoices. Put the list in order so that invoices from the same vendor are together in the listStep 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