Loading...

Top Buyers by Transaction Count

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

Domain
SQL
Difficulty
medium
Seniority
mid

Problem

Rank users by the number of transactions they have completed, using a dense ranking so that users with equal counts share the same rank. Return the username, transaction count, and rank for users in the top 5 tiers.

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.