You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

exer_5C51.sql 246B

123456789
  1. USE AP;
  2. SELECT vendor_name,
  3. COUNT(*) AS invoice_qty,
  4. ROUND(AVG(invoice_total), 2) AS invoice_avg
  5. FROM vendors JOIN invoices
  6. ON vendors.vendor_id = invoices.vendor_id
  7. GROUP BY vendor_name HAVING AVG(invoice_total) > 500
  8. ORDER BY invoice_qty DESC;