View difference between Paste ID: aqP2ATJp and wjgf83L3
SHOW: | | - or go back to the newest paste.
1-
SELECT CAST(invoice_date AS date),
1+
SELECT MIN(total),
2-
       customer_id,
2+
        MAX(total)
3-
       total
3+
4
WHERE EXTRACT(MONTH FROM CAST(invoice_date AS TIMESTAMP)) = 9
5-
WHERE EXTRACT(MONTH FROM CAST(invoice_date AS timestamp)) = 9 
5+
  AND customer_id IN(11, 13, 44, 36, 48, 52, 54, 56);