Re: Untitled

From Smelly Finch, 4 Months ago, written in Plain Text, viewed 82 times. This paste is a reply to Untitled from Tiny Moth - view diff
URL http://codebin.org/view/27867816 Embed
Download Paste or View Raw
  1. SELECT DISTINCT(customer_id),
  2.        SUM(total),
  3.      
  4.       SUM(total)/COUNT(DISTINCT(customer_id))
  5.        
  6. FROM invoice
  7. WHERE billing_country = 'USA'
  8. GROUP BY (customer_id);

Reply to "Re: Untitled"

Here you can reply to the paste above