Loading...

Campaign Conversion Window

A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
hard
Seniority
senior, staff

Problem

Our ad platform logs impressions, clicks, and purchases. For each campaign, compute the click-through rate and the conversion rate as percentages rounded to 2 decimal places. A conversion means a user who clicked an ad and then made a purchase within 7 days. Only include campaigns with at least 3 impressions.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.