Loading...
Experiment Impact
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
Problem
Data science wants to rank A/B test performance inside each variant. For each (exp_name, variant) pair in experiments, compute the average outcome and participant count, skipping rows where outcome is NULL. Within each variant, rank experiments by average outcome from best to worst with ties sharing a position. Return the exp_name, variant, average outcome, participant count, and position.
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.