DataDrivenDataDriven
LearnPracticeInterviewDailyJobsCommunity

Love and Loathing

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

Domain
SQL
Difficulty
hard
Seniority
L5

Problem

We run a feature-flag platform where every flag has an owner team, an on/off state, and a rollout percentage. Line up the enabled flags from the highest rollout down and the disabled flags from the lowest rollout up, then pair them off by position: the top enabled flag with the top disabled flag, the second with the second, and so on. Break ties within each side by the lower flag ID first, and return each pair's two owner teams.

Summary

Some teams champion the flag. Others would kill it.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and checks it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • SQL Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons