Subject [OT ?] sql question
Author duilio_fos
>>
select custID, sum(price*qty) from mv_li where op='PURCHASE' group by
custID
>>

The instruction above gives me the list of all customers, together
with the total value of the goods they purchased.

This almost what I need.

The final touch would be to get the list ordered by the purchase
total, so that customers are ordered by their "weight".

How do I do that ?

I cannot add

...order by sum(price*qty)

(The SQL parser complains as soon as the term "sum" is reached).

TIA

Duilio Foschi