Loading...
Top Commit Authors by Repo
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- senior
Problem
Find the top 3 commit authors in each repo by average lines added. In case of a tie, break by author name alphabetically. Show each repo with its best, second-best, and third-best authors. If a position is unfilled, label it accordingly (e.g., 'No second author'). Format each entry as 'author (avg_added)'. Round to 1 decimal place.
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.