Kings for a Day
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant feedback.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L5
Problem
We run a batch-processing platform where jobs record how many rows they moved and the time they started. For each calendar day, find the job that moved the most rows, and when two jobs tie for a day's highest count, report all of them. Return the day, the job name, and its row count, earliest day first.
Summary
Every day, one job moves more rows than all the rest.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and checks it automatically.