Write a query to find the top three highest-performing advertising campaigns based on click-through rate (CTR), grouped by therapeutic area at PulsePoint.
Calculate CTR as clicks divided by impressions. Include only campaigns with positive impressions and non-null clicks. Return up to three campaigns per therapeutic area.
Output
- One row per qualifying campaign, with
therapeutic_area, campaign_id, campaign_name, and ctr.
- Sort by therapeutic area, CTR descending, then campaign ID ascending to break ties.