Running tally

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Running tally
Дата
Msg-id 3F7E9956.30804@familyhealth.com.au
обсуждение исходный текст
Ответы Re: Running tally  (Richard Huxton <dev@archonet.com>)
Re: Running tally  (elein <elein@varlena.com>)
Список pgsql-sql
Hi guys,

If I have a table that is just a single column full of numbers, how can 
I select all the rows from the table with a second column that is the 
running tally so far down the result set?

eg:

Num     Tally so far
0.3    0.3
1.2    1.5
2.0    3.5
...

Does this require PL/PgSQL coding?  If so, how do you actually construct 
an arbitrary row for returning?  The docs are somewhat unclear on this.

Chris




В списке pgsql-sql по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: sql performance and cache
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Running tally