Search function for customer report

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
nain99
Posts: 3
Joined: Tue Oct 10, 2017 12:44 pm

Search function for customer report

Post by nain99 » Thu Jun 15, 2006 4:31 pm

I want to search the top customers who spent in year of 2005 and also in year of 2006 (from 1/1/2006 to 5/31/2006). How can I write the query for it?__Thank you very much

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> Search function for customer report

Post by kfleming » Mon Jun 19, 2006 7:12 am

Group by customer, create a total that sums sales and make it pre-processed. Query for sales year equals 2005. Then sort by the pre-processed total descending and customers will print with the top sales value for 2005 first.

Post Reply