Back From the Brink
A hard SQL mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- L5
Interview Prompt
Each row in deploy_logs is one deployment by an engineer (author), with a status and a deploy_at timestamp. Treat author names case-insensitively (e.g. 'Alice' and 'alice' are the same engineer), and likewise normalize status casing. We want to find engineers who bounced back after a rollback: order each engineer's deployments by deploy_at, and find any deployment whose status is 'rolled_back' where that engineer's very next deployment (by timestamp) has status 'success'. Return a single number: the count of DISTINCT engineers who had at least one such rolled_back -> success transition.
Summary
Roll it back, then nail the next one.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your sql solution with real code execution
- Get instant feedback and a hire/no-hire decision