Re: Re: Re: Re: Re: Re: Untitled

From Obese Pheasant, 2 Months ago, written in Plain Text, viewed 71 times. This paste is a reply to Re: Re: Re: Re: Re: Untitled from Crippled Pintail - view diff
URL http://codebin.org/view/bfbee0ac Embed
Download Paste or View Raw
  1. SELECT EXTRACT(YEAR FROM CAST(invoice_date AS date)),
  2.        MIN(total),
  3.        MAX(total),
  4.        SUM(total),
  5.        COUNT(invoice_id),
  6.        ROUND(SUM(total)/COUNT(DISTINCT customer_id))
  7. FROM invoice
  8. WHERE billing_country IN('USA',
  9.                         'United Kingdom',
  10.                         'Germany')
  11. ORDER BY EXTRACT(YEAR FROM CAST(invoice_date AS date)) DESC;

Reply to "Re: Re: Re: Re: Re: Re: Untitled"

Here you can reply to the paste above