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

SQL Consider the query shown. SELECT vendor id, invoice number, invoice total

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!