The Lion's Share
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 merchandising finance team suspects our revenue is far more concentrated than the catalog's breadth suggests: a handful of product categories may be quietly carrying the whole business while the rest contribute noise. To make the next planning cycle's investment case, they want a clear picture of how purchase revenue is distributed across product categories. For each category, show how much total purchase revenue it brought in, how many purchases it took to get there, and what portion of the company's overall revenue that category represents, presented from the biggest earner down to the smallest so the concentration is obvious at a glance.
Summary
Every category claims its slice. Find out who really owns the table.
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