Why not use a cursor? P.S. A moving average will look much better if
you Hahn the tails.
But when you start let x[0], y[0] be the
first point, and then average the next 2 for the second point… until you
get to 7 and then do the same thing in the other end. Otherwise, you get
a very strange looking curve. IMO-YMMV From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Vanole, Mike Hi, I need to calculate a moving average and I would like to do
it with SQL, or a Pg function built for this purpose. I'm on Pg 7.4. Is this
possible in Pg without a bunch of self joins, or is there a funtion
available? Thanks, Mike |
Title: Message
- Re: [GENERAL] Calculating a moving average Dann Corbit
- Re: [GENERAL] Calculating a moving average Jim C. Nasby
- Re: [GENERAL] Calculating a moving average Greg Stark
- Re: [GENERAL] Calculating a moving average Jim C. Nasby
- Re: [GENERAL] Calculating a moving average Greg Stark
- Re: [GENERAL] Calculating a moving average mstory
- Re: [GENERAL] Calculating a moving average... Alban Hertroys
- Re: [GENERAL] Calculating a moving av... Russell Smith
- Re: [GENERAL] Calculating a movin... mstory
- [GENERAL] self-join on subsel... PFC
- Re: [GENERAL] self-join on su... Jim C. Nasby