Loading interview...

Previous Day Top Service

A hard SQL mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.

Domain
SQL
Difficulty
hard
Seniority
mid, senior

Interview Prompt

Build a daily revenue dashboard widget that shows each date's top-spending service from the previous day. Round totals to 2 decimal places before comparing. If multiple services tie for the top spot, show all. Only include dates where prior-day data exists. Return the billing day, service name, and total amount.

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