Feature Flag Fan vs Detractor Pairs
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- L5
Problem
Rank enabled users by rollout percentage descending, and disabled users by rollout ascending. Pair the #1 fan with the #1 detractor, #2 with #2, and so on. Break ties by flag ID ascending, and show both user IDs.
Summary
Some users love the flag. Others want it gone.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.