Loading interview...

Top Content by Views

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

Interview Prompt

Inner-join content_items to page_views on creator_id = user_id (treating each page_view by a user as a view of any content authored by that user). Per content_id, count view rows. Rank content items by that count descending with standard RANK (ties skip). Return title and view_count for items at rank 5 or less. Sort by view_count descending, tie-break alphabetically by title.

How This Interview Works

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write your sql solution with real code execution
  4. Get instant feedback and a hire/no-hire decision