Loading interview...
Peak Concurrent Batch Jobs
A medium SQL mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- mid, senior
Scenario
Capacity planning: the scheduler has a fixed concurrency limit. If peak concurrency exceeds it, jobs queue and SLAs slip. The team needs to know the historical peak so they can set the limit correctly.
Interview Prompt
The platform team wants to right-size the job scheduler. Given a batch_jobs table with started and ended timestamps, find the maximum number of jobs that were running at the same time. A job is considered running from its started timestamp up to but not including its ended timestamp.
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