Re: [sqlite] windowing functions != recursive functions

2005-10-13 Thread pilot pirx
if there is a sufficient interest. - Original Message - From: [EMAIL PROTECTED] To: sqlite-users@sqlite.org Subject: Re: [sqlite] windowing functions != recursive functions Date: Wed, 12 Oct 2005 22:48:35 -0400 > > "pilot pirx" <[EMAIL PROTECTED]> wrote: > &

Re: [sqlite] windowing functions != recursive functions

2005-10-13 Thread Andrew Piskorski
On Wed, Oct 12, 2005 at 09:05:26PM -0500, pilot pirx wrote: > There is no problem in computing moving average > or cumulative sum etc > with the existing SQL (or dealing with time windows > in general) - it just the SQL gets nasty - examples Except that the SQL doesn't "just" get nasty, it can

Re: [sqlite] windowing functions != recursive functions

2005-10-13 Thread Andrew Piskorski
On Wed, Oct 12, 2005 at 09:05:26PM -0500, pilot pirx wrote: > The windowing functions described in the link > are different from recursive functions. Yes, I think you're right. Your EMA example bugged me, so I fooled with it, but I couldn't come up with any way to implement EMA using plain

Re: [sqlite] windowing functions != recursive functions

2005-10-12 Thread drh
"pilot pirx" <[EMAIL PROTECTED]> wrote: > Now, for the recursive function like exponential moving average > the defintion is that > > ema(i+1) = val(i) * coef + ema(i) * (1-coef). > > That is I have to know the previous value of both EMA _and_ VALUE > (while for moving avearage I need to