DataDriven
LearnPracticeInterviewDiscussDailyJobs

Back From the Brink

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

Domain
SQL
Difficulty
hard
Seniority
L5

Problem

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.

Practice This Problem

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

Related

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