jellyrows
← All demo reports

Revenue this month

The headline number, with last month as the delta comparison.

Running…
View SQL
SELECT date_trunc('month', created_at)::date AS month,
       round(sum(total)) AS revenue
  FROM sample.orders
 WHERE status = 'completed'
   AND created_at >= date_trunc('month', now()) - interval '1 month'
 GROUP BY 1
 ORDER BY 1 DESC