caculating while select - maybe sum ?

Поиск
Список
Период
Сортировка
От Ben-Nes Michael
Тема caculating while select - maybe sum ?
Дата
Msg-id 00d801c1ae4f$d623bbc0$aa0f5ac2@canaan.co.il
обсуждение исходный текст
Ответы Re: caculating while select - maybe sum ?
Список pgsql-general
Hi All

im trying to calculate hour usage so a typical row is: 1. enter time, 2.
exit time 3. sum() until this row

Couldn't use sum() as it ask me to 'group by' which I don't want.

Is there a way to add the previous row value to the current, per row ?

example:
select row1, row2, (row1 + row2 until now) from table;

--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--------------------------



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

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: rule on update
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Getting fields in a table through a query?