jamesbeale
New Member
- Joined
- Jan 10, 2018
- Messages
- 2
Hi all,
I have a 2 column table which contains customer names and order values. As customers place more orders, they are added to the table, therefore I have multiple entries for each customer.
Can someone advise on how I can retrieve the customer name and cumulative total for that has the customer that has the highest cumulative value of all orders?
Example below, what I want to return is "Customer A - 900.00"
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Customer A[/TD]
[TD]100.00[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Customer B[/TD]
[TD]200.00[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Customer C[/TD]
[TD]300.00[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Customer A[/TD]
[TD]200.00[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Customer C[/TD]
[TD]50.00[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Customer A[/TD]
[TD]400.00[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Customer B[/TD]
[TD]100.00[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Customer A[/TD]
[TD]200.00[/TD]
[/TR]
</tbody>[/TABLE]
Thanks.
I have a 2 column table which contains customer names and order values. As customers place more orders, they are added to the table, therefore I have multiple entries for each customer.
Can someone advise on how I can retrieve the customer name and cumulative total for that has the customer that has the highest cumulative value of all orders?
Example below, what I want to return is "Customer A - 900.00"
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Customer A[/TD]
[TD]100.00[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Customer B[/TD]
[TD]200.00[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Customer C[/TD]
[TD]300.00[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Customer A[/TD]
[TD]200.00[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Customer C[/TD]
[TD]50.00[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Customer A[/TD]
[TD]400.00[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Customer B[/TD]
[TD]100.00[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Customer A[/TD]
[TD]200.00[/TD]
[/TR]
</tbody>[/TABLE]
Thanks.