LG Ad Solutions needs to compare campaign click-through rates across device types. Write a SQL query that calculates aggregated impressions, clicks, and CTR for each campaign and device combination during the 30-day period ending on September 15, 2026.
Output
- One row per campaign and device type, with columns
campaign_name, device_type, impressions, clicks, and ctr_percent.
- Include only performance records from August 16, 2026 through September 15, 2026, inclusive. Treat NULL clicks as zero, and return no CTR for groups whose total impressions are zero.
- Sort by campaign name alphabetically, then device type alphabetically, with NULL device types last.