Untitled

From Silly Moth, 9 Months ago, written in Plain Text, viewed 167 times.
URL http://codebin.org/view/be859af8 Embed
Download Paste or View Raw
  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) DESC, customer_id
  8. LIMIT 5;

Reply to "Untitled"

Here you can reply to the paste above