Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT customer_id,
- COUNT(customer_id)
- FROM invoice
- WHERE billing_country = 'USA'
- AND CAST(invoice_date AS date) BETWEEN '2011-05-25' AND '2011-09-25'
- GROUP BY customer_id
- ORDER BY COUNT(customer_id), customer_id DESC
- LIMIT 5;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement