Earlier this year I was bothering this list with many questions about
the sqlite virtual table support, because I needed (among other
things) an efficient way to compute moving averages. And here is the
result, free for anyone to play with:
http://voksenlia.net/sqlite3/interpolate.c
Rather than
Yuriy Kaminskiy
> Sent: Sunday, 12 August, 2012 20:49
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] how to update the Moving average value
>
> Keith Medcalf wrote:
> > You are right Klaas, it should be -2 not -3. You could always constrain id
> to (MAXINT >= i
Of YAN HONG YE
> Sent: Sunday, 12 August, 2012 19:31
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] how to update the Moving average value
>
> select dexin, code,new, (select avg(new) from tb1 where dexin between dexin-3
> and dexin)as mavg from tb1;
>
> t
>> Sent: Sunday, 12 August, 2012 12:49
>> To: SQLite MailList
>> Subject: Re: [sqlite] how to update the Moving average value
>>
>> Keith Metcalf wrote:
>>
>>
>>> id Sales_vol mov_avg
>>> 11
>>> 22
>>> 3
se"
>Subject: Re: [sqlite] how to update the Moving average value
>Message-ID: <545265ad8b7cfb45b4f7f9160b8cc...@mail.dessus.com>
>Content-Type: text/plain; charset="us-ascii"
>
>
>select id, sales_vol, (select avg(sales_vol) as mavg
>
On 12-08-2012 20:49, Klaas V wrote:
Keith Metcalf wrote:
id Sales_vol mov_avg
11
22
33 =(1+2+3)/3
45 =(2+3+5)/3
54 =(3+5+4)/3
62 =(5+4+2)/3
7
select id, sales_vol, (select avg(sales_vol) as mavg
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Klaas V
> Sent: Sunday, 12 August, 2012 12:49
> To: SQLite MailList
> Subject: Re: [sqlite] how to update the Moving average value
>
> Keith Metcalf wrote:
>
>
> >id Sales
Keith Metcalf wrote:
>id Sales_vol mov_avg
>1 1
>2 2
>3 3 =(1+2+3)/3
>4 5 =(2+3+5)/3
>5 4 =(3+5+4)/3
>6 2 =(5+4+2)/3
>7
>select id, sales_vol, (select avg(sales_vol) as mavg
>
s-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of ???
> Sent: Saturday, 11 August, 2012 22:46
> To: sqlite-users@sqlite.org
> Subject: [sqlite] how to update the Moving average value
>
> I hace many record of product database,and wanna count the m
I hace many record of product database,and wanna count the moving average
value of sales_vol of last 3 days(id) of value, how to write sql command?
id Sales_vol mov_avg
1 1
2 2
3 3 =(1+2+3)/3
4 5 =(2+3+5)/3
5 4
10 matches
Mail list logo