Search Postgresql Archives

Running Total with a Set Maximum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux