Find customers with more than N orders
SQL
Medium
3 views
Problem Description
Write a query using subquery that returns customers who placed more than 3 orders.
Sample Test Case
Input:
Orders(customer_id)
Official Solution
SELECT customer_id FROM Orders GROUP BY customer_id HAVING COUNT(*) > 3;
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!