Re: Re: Re: Untitled

From Rude Cockroach, 2 Months ago, written in Plain Text, viewed 93 times. This paste is a reply to Re: Re: Untitled from Melodic Marmoset - view diff
URL http://codebin.org/view/748ac08f Embed
Download Paste or View Raw
  1. SELECT billing_country AS country,
  2. COUNT(total) AS total_invoice,
  3. COUNT(DISTINCT customer_id) AS total_customer
  4. FROM invoice
  5. WHERE EXTRACT(YEAR FROM CAST(invoice_date AS timestamp)) IN
  6. (SELECT EXTRACT(YEAR FROM CAST(invoice_date AS timestamp))
  7. FROM invoice
  8. WHERE EXTRACT(MONTH FROM CAST(invoice_date AS timestamp)) IN (6,7,8)
  9. GROUP BY EXTRACT(YEAR FROM CAST(invoice_date AS timestamp))
  10. ORDER BY SUM(total) DESC
  11. LIMIT 1)
  12. GROUP BY country
  13. ORDER BY total_invoice DESC, country;

Replies to Re: Re: Re: Untitled rss

Title Name Language When
Re: Re: Re: Re: Untitled Ample Meerkat text 2 Months ago.

Reply to "Re: Re: Re: Untitled"

Here you can reply to the paste above