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-13.sql 304B

12345678
  1. SELECT 'Active' AS source, invoice_number, invoice_date, invoice_total
  2. FROM active_invoices
  3. WHERE invoice_date >= '2018-06-01'
  4. UNION
  5. SELECT 'Paid' AS source, invoice_number, invoice_date, invoice_total
  6. FROM paid_invoices
  7. WHERE invoice_date >= '2018-06-01'
  8. ORDER BY invoice_total DESC;