DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Ones Who Hold Attention

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
Seniority
mid

Interview Prompt

The content team has noticed that raw view counts are flattering the wrong people: a creator can rack up opens and still lose everyone in the first ten seconds, while a quieter creator keeps people glued to the end. Leadership wants to reward the second kind. For every creator who has had at least one of their pieces actually watched, work out how completely their audience tends to make it through a piece, on average, treating each view's progress as the fraction of the piece's length that was watched (watch_seconds divided by that piece's duration_seconds), and only counting pieces whose duration_seconds is greater than zero. Return three columns per creator: creator_id, how many views fed into that figure (total_views), and the average completion fraction rounded to 4 decimal places (avg_completion_ratio). Present the creators in order of who holds attention best, with the most engaging at the top; break ties by creator_id ascending.

Summary

Plenty of creators get the click. Find the ones who actually keep people watching.

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

Related

  • All Mock Interviews
  • Practice Mode (untimed)
  • SQL Interview Questions
  • Data Engineering Interview Prep Guide
  • Practice Problems
  • Daily Challenge