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_5C54.sql 248B

12345678910
  1. SELECT
  2. invoice_date,
  3. COUNT(*) AS invoice_qty,
  4. SUM(invoice_total) AS invoice_sum
  5. FROM invoices
  6. WHERE invoice_date BETWEEN '2018-05-01' AND '2018-05-31'
  7. GROUP BY invoice_date
  8. HAVING COUNT(*) > 1
  9. AND SUM(invoice_total) > 100
  10. ORDER BY invoice_date DESC