nathan-castor
4/25/2018 - 8:32 PM

GET ALL of LAST DAY time period


SELECT
  *
FROM
  reports_account_snapshot
WHERE
  event_date IN (
    SELECT   MAX(event_date)
    FROM     reports_account_snapshot
    GROUP BY date_trunc('month',event_date), date_trunc('year',event_date)
  )
 AND closed_store = false