Using a CTE named big_spenders that selects user_id and SUM(total_amount) AS total from transactions
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
Using a CTE named big_spenders that selects user_id and SUM(total_amount) AS total from transactions grouped by user_id with total over 100, return user_id and total from big_spenders ordered by total descending, limit 5.
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