Re: [sqlite] Calculation between rows?

2005-07-18 Thread Kurt Welgehausen
> I suppose I could copy the data table into a temporary > table ... documenataion quarantees AUTOINCREMENT fields > to be "monotonically increasing" ... "Monotonically increasing" does not mean that for every key k there will be a key (k-1). In fact, if you ever delete a row in an autoincrement

Re: [sqlite] Calculation between rows?

2005-07-17 Thread William Trenker
On 7/17/05, Darren Duncan <[EMAIL PROTECTED]> wrote: > Assuming there actually is a meta-data function like ROW_NUMBER(), > which is the ordinal value of the row in the query result, you can > just do something like this: > > SELECT > FROM ( >SELECT ROW_NUMBER() AS myrownum, sq.* >FROM

Re: [sqlite] Calculation between rows?

2005-07-17 Thread Darren Duncan
At 4:27 PM -0400 7/17/05, William Trenker wrote: I've been searching the web on such topics like "sql calculation between rows" but I'm not having much success. The best hint I've found is to construct a join between the table and itself but I can't see how to do that in a way that offsets one

[sqlite] Calculation between rows?

2005-07-17 Thread William Trenker
I have a simple data acquisition application that reads a byte counter and records it in an sqlite3 table. The table is defined as: create table data (timestamp, bytecount); The 'timestamp' field is the output of the standard c-library seconds-since-the-epoch time() function and the 'bytecount'