pepperwind / answer_key /kpis /ad_spend.sql
rasinmuhammed's picture
Pepperwind Trading Co. preview, version 1.0
27ec678 verified
Raw History Blame Contribute Delete
292 Bytes
-- Paid media spend, by currency
-- Platform-reported cost by day, added up by month.
SELECT strftime(date, '%Y-%m') AS month, currency AS grp, sum(cost) AS value FROM marketing.ad_spend_daily WHERE date >= TIMESTAMP '2023-10-01' AND date < TIMESTAMP '2026-10-01' GROUP BY 1, 2 ORDER BY 1, 2