PulsePoint needs a report showing how each advertiser's daily ad spend compares with its other spending days. Write a SQL query that calculates daily spend for each advertiser during the reporting period from August 18, 2026 through September 15, 2026, inclusive, and returns the advertiser details with each day's rank.
Output
- Return one row per advertiser and spend date with columns
advertiser_id, advertiser_name, spend_date, daily_spend, and spend_rank.
- Treat NULL spend amounts as zero when calculating daily spend. Rows outside the thirty-day reporting period are excluded.
- Rank each advertiser's days from highest to lowest daily spend. Equal daily totals share a rank, and ranking gaps are retained.
- Sort by
advertiser_id, rank ascending, and spend_date ascending.