Sampling or filtering transactions down to last X per customer
I really don't want to have to loop through customer by customer as performance will be dire. Is there a smarter/simpler way of doing this? Each transaction has a timestamp and a client id.
Thanks in advance for any suggestions.