Using a CTE named high_value that selects product_id and SUM(total_amount) AS revenue from transacti
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 high_value that selects product_id and SUM(total_amount) AS revenue from transactions grouped by product_id, join back to products to return product_name and revenue for any product with revenue > 50. Order by revenue DESC, then product_name.
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