Advertisement
korenizla

Тема 3 Урок 6 Задача 2

Jan 12th, 2023
752
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT customer_id,
  2.        COUNT(customer_id)
  3. FROM invoice
  4. WHERE billing_country = 'USA'
  5.         AND CAST(invoice_date AS date) BETWEEN '2011-05-25' AND '2011-09-25'
  6. GROUP BY customer_id
  7. ORDER BY COUNT(customer_id), customer_id DESC
  8. LIMIT 5;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement