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 revenue is far more concentrated than the catalog's breadth suggests, and wants a clear picture of how purchase revenue splits across product categories. For each category, show its total purchase revenue, how many purchases produced it, and that category's share of the company's overall revenue, from the biggest earner down to the smallest.
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