Loading interview...
Top Content by Lifetime Value
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
Define each content item's lifetime value as the sum of watch_seconds from content_views across all viewers of that item. Ignore views with a null watch_seconds. Using DENSE_RANK over lifetime value descending, return content items in the top 3 ranks. If items tie at a rank, include all tied items. Show the content id, title, and lifetime value.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your sql solution with real code execution
- Get instant feedback and a hire/no-hire decision