I'm trying to list the top customers by an amount field. I need to calculate the amount field before I can sort it. I can total up the amount field. The problem I'm having is figuring out a way to sort by the totaled amount.
I am doing this in a web page (using InterDev) so I need something that can have values passed to it so I can select records by a certain date range, etc.
example . . .
Table:
Cust# Amt
1 10.00
2 7.50
2 20.00
1 9.50
Result desired:
Cust# Amt
2 27.50
1 19.50
If this is clear as mud let me know and I will try to explain more.
I am doing this in a web page (using InterDev) so I need something that can have values passed to it so I can select records by a certain date range, etc.
example . . .
Table:
Cust# Amt
1 10.00
2 7.50
2 20.00
1 9.50
Result desired:
Cust# Amt
2 27.50
1 19.50
If this is clear as mud let me know and I will try to explain more.