Question: 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 list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
