Untitled
Anonymous
plain_text
06/10/2023 8:10 AM
344 B
20
Indexable
SELECT customer_id,
COUNT(customer_id)
FROM invoice
WHERE billing_country = 'USA'
AND date(CAST(invoice_date as timestamp)) BETWEEN '2011-05-25' AND '2011-09-25'
GROUP BY customer_id
ORDER BY COUNT(customer_id) DESC, customer_id ASC
LIMIT 5;Editor is loading...