Two Names, One Campaign
A easy SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- easy
- Seniority
- L4
Problem
The advertising team labels campaigns in loud uppercase (ad_impressions.ad_campaign, e.g. FLASH_SALE_48H), while the push-notification team uses lowercase slugs (push_notifs.campaign, e.g. flash_sale). The two systems were never reconciled, but some campaigns are clearly the same effort under different names: they share a theme keyword. An ad_impressions row is considered "reconciled" if its ad_campaign shares one of the theme keywords 'flash', 'loyalty', or 'summer' with at least one non-null push_notifs.campaign value (matching is case-insensitive). Return the percentage of all ad_impressions rows (out of every ad_impressions row) that are reconciled. Return a single number between 0 and 100.
Summary
The ad team and the push team never agreed on naming. Find where they secretly meant the same thing.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.