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_5C50.sql 262B

1234567
  1. SELECT vendor_state, vendor_city, COUNT(*) AS invoice_qty,
  2. ROUND(AVG(invoice_total), 2) AS invoice_avg
  3. FROM invoices JOIN vendors
  4. ON invoices.vendor_id = vendors.vendor_id
  5. GROUP BY vendor_state, vendor_city
  6. HAVING COUNT(*) >= 2
  7. ORDER BY vendor_state, vendor_city