Subject Re: RunSum in Firebird
Author Halim B
This is an example of what I want.
I have a table called "Sales" with two fields ItemDescription and
totalsales.
Sale:
ItemDescription, TotalSales
Coke $500.00
Water $800.00
Pepsi $300.00
Orange Juice $600.00

I would like to get the following results :

ItemDescription, TotalSales Rank
Coke $500.00 3
Water $800.00 1
Pepsi $300.00 4
Orange Juice $600.00 2

Rank column is sorted based on the highest TotalSales.
Using ElevateDB database engine I used to run this query:
Select *, RunSum(1) from Sales Order by TotalSales Desc.

I am trying to do the same thing with firebird.
-Halim