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.

demo-queries-from slides-7.sql 285B

123456789
  1. SELECT vendor_id, COUNT(*) AS invoice_count,
  2. SUM(invoice_total) AS invoice_total
  3. FROM invoices
  4. GROUP BY vendor_id WITH ROLLUP;
  5. SELECT vendor_state, vendor_city, COUNT(*) AS qty_vendors
  6. FROM vendors
  7. WHERE vendor_state IN ('IA', 'NJ')
  8. GROUP BY vendor_state, vendor_city WITH ROLLUP;