Re: [sqlite] how to update the Moving average value

2012-08-12 Thread Keith Medcalf
You are right. Id however is presumed to be related to what is being averaged over, not a rowid. One would presume that the simple integers are just "demo values" and that in actual fact it contains a Modified Julian Date. If it does not contain an "offset in days from some base value" then

Re: [sqlite] how to update the Moving average value

2012-08-12 Thread Keith Medcalf
The inner query is called a correlated subquery. The query in ( ... ) is executed for each row of the outer query. Correlated means that a value from the "outer query" is used to constrain (in a where condition) the rows used when computing the scalar result of the subquery. > select dexin,

Re: [sqlite] Feature Request: ARM version for WinRT

2012-08-12 Thread Joe Mistachkin
The new VSIX package for Visual Studio 2012 contains a build of SQLite for WinRT on ARM. Please look for the "sqlite-winrt-3071300.vsix" file in the "Precompiled Binaries for Windows Runtime" on the page: http://www.sqlite.org/download.html Alternatively, it may be downloaded while insi

Re: [sqlite] how to update the Moving average value

2012-08-12 Thread Yuriy Kaminskiy
Keith Medcalf wrote: > You are right Klaas, it should be -2 not -3. You could always constrain id > to (MAXINT >= id >= 3-MAXINT) if you wanted to be sure there would not be an > arithmetic overflow. 1) s/MAXINT/INT64_MAX/; 2) it is rather inefficient; 3) it will break on ID discontinuity; and

[sqlite] Feature Request: ARM version for WinRT

2012-08-12 Thread Lukas Fellechner
Hi all, it is great to have the WinRT compliant version of SQLite, good work!! Now one last thing missing is the WinRT / ARM version. It is possible right now without bigger modifications: http://stackoverflow.com/questions/11176978/how-can-i-compile-sqlite-for-winrt-arm Probably just some bui

Re: [sqlite] how to update the Moving average value

2012-08-12 Thread YAN HONG YE
select dexin, code,new, (select avg(new) from tb1 where dexin between dexin-3 and dexin)as mavg from tb1; the result is only one value, and table only one: tb1 I don't know why have tbl b and tbl a >From: "Keith Medcalf" >To: "General Discussion of SQLite Database" >Subject: Re: [sqlite]

Re: [sqlite] how to update the Moving average value

2012-08-12 Thread Luuk
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

Re: [sqlite] how to update the Moving average value

2012-08-12 Thread Keith Medcalf
You are right Klaas, it should be -2 not -3. You could always constrain id to (MAXINT >= id >= 3-MAXINT) if you wanted to be sure there would not be an arithmetic overflow. --- () ascii ribbon campaign against html e-mail /\ www.asciiribbon.org > -Original Message- > From: sqlite-u

Re: [sqlite] how to update the Moving average value

2012-08-12 Thread Klaas V
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 >                      

Re: [sqlite] Typo on hwaci.com website (cerod.html)

2012-08-12 Thread Bernd
Am 12.08.2012 02:32, schrieb Theodore M. Rolle, Jr. (Ted): And "You will" is _so_ geek. As are passive sentences. "Will" indicates that the object that is in the future. It should never be used for currently-running software, licensing, ... . . . It might be good to be consistent about whe