Re: [GENERAL] Average Balance "life"

2012-10-31 Thread telenieko
Hi, On Tuesday, October 30, 2012 8:12:25 PM UTC+1, "David Johnston" wrote: > Start learning about Window functions/clauses: > http://www.postgresql.org/docs/9.2/interactive/tutorial-window.html > > The lag function over a window ordered by date will allow you to calculate > how many days since th

[GENERAL] Average Balance "life"

2012-10-30 Thread telenieko
Hi there, Not sure if this is the right place to post this question: I'm tryting to find a way to do the following without going row by row on the client program doing the calculations: I've got a "movements" table (from an accounting program) for which I've already done monthly balances and r