Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. SELECT customer_email, customer_firstname, customer_lastname, SUM(subtotal_invoiced) AS t
  2. Min(created_at) as d,
  3. Count (*) as num
  4.  
  5. FROM sales_flat_order AS a
  6.  
  7. GROUP BY customer_email ORDER BY t DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement