Loading...

2nd Most Common Content Type

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

Domain
SQL
Difficulty
hard
Seniority
mid, senior

Problem

The content platform team is analyzing what formats registered creators prefer. Only content from creators with a registered user account should be considered. Determine the second most popular content type by volume, and if multiple types tie for that rank, include all of them. Return the full content item records for every item belonging to the qualifying type or types.

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.