Based on Mike's answer you can loop through the transaction list which is sorted by customer :
Group by and distinct are 2 capabilities I have missed frequently in Mendix. Here is a way you can accomplish what I think you need to do:
You'll need to test out performance of this with your volumes. Aside from the initial retrieve, all other retrieve/list operations happen in memory vs. requiring database activity.
Hope that is helpful.