Loading...

Zero-Retry Job Ratio by Priority

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

Domain
SQL
Difficulty
hard
Seniority
mid

Problem

The batch processing system tracks retry counts per job. Calculate the ratio of jobs that completed without any retries to total jobs, broken down by priority level. A zero-retry job has retries equal to 0. Show the priority, count of zero-retry jobs, total jobs for that priority, and the ratio, from lowest ratio to highest.

Practice This Problem

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