Running Total with a Set Maximum

Поиск
Список
Период
Сортировка
От Paul Newman
Тема Running Total with a Set Maximum
Дата
Msg-id 2796D8B40BBACF42965C54F9AE6969B30180AF@sbs2003.prohire.local
обсуждение исходный текст
Ответы Re: Running Total with a Set Maximum  (Peter Hunsberger <peter.hunsberger@gmail.com>)
Список pgsql-general
Hi,
Could someone out there help me.
Given the following set of values
+3
+3
0
+3
+3
-3
0
+3
 
I want to have a maximum sum of 6 at any one point , in other words I want the following
 
 
+3  --  3
+3  --  6
0   --  6
+3  --  6
+3  --  6
-3  --  3
0  -- 3
+3  -- 6
 
How can I do this ?
 
Thank you
 
Paul Newman
 
 

Disclaimer
This message may contain information which is legally privileged and/or confidential.  If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited.  Such notification not withstanding, any comments or opinions expressed are those of the originator, not of Prohire Software Systems Ltd, unless otherwise explicitly stated.

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

Предыдущее
От: Vyacheslav Kalinin
Дата:
Сообщение: Re: Scalar subquery
Следующее
От: Luka Novak
Дата:
Сообщение: postgreSQL problem