Re: [sqlite] SQL:2003 -- Window Functions

2012-09-20 Thread Eleytherios Stamatogiannakis
While i haven't needed this functionality, i have been thinking about how it could be solved in a performant way. IMHO, the solution would be to create a virtual table that takes, for example, as input a query that produces the following rows: C1 | C2 a1 | b1 a2 | b2 a3 | b3 and

Re: [sqlite] SQL:2003 -- Window Functions

2012-09-20 Thread Gabor Grothendieck
On Wed, Sep 19, 2012 at 12:51 PM, joe.fis...@tanguaylab.com wrote: > Too bad SQLite doesn't yet support SQL Window Functions. > > Are there any SQLite Extension Libraries that support "SQL:2003 type Window > Functions"? > I specifically need LEAD and LAG to calculate an

Re: [sqlite] SQL:2003 -- Window Functions

2012-09-19 Thread Igor Tandetnik
Mohd Radzi Ibrahim wrote: > On Thu, Sep 20, 2012 at 12:58 AM, Igor Tandetnik wrote: > >> On 9/19/2012 12:51 PM, joe.fis...@tanguaylab.com wrote: >> >>> Too bad SQLite doesn't yet support SQL Window Functions. >>> >>> Are there any SQLite Extension

Re: [sqlite] SQL:2003 -- Window Functions

2012-09-19 Thread Keith Medcalf
> > Could it not be done with inner select of ROWID-n and ROWID+n to get the > > LEAD and LAG row ? > > > > select > > logtime as timeNow, > > (select logtime from logtable where rowid=a.rowid-1) as timeBefore, > > (select logtime from logtable where rowid=a.rowid+1) as timeAfter >

Re: [sqlite] SQL:2003 -- Window Functions

2012-09-19 Thread Pavel Ivanov
On Wed, Sep 19, 2012 at 7:10 PM, Mohd Radzi Ibrahim wrote: > On Thu, Sep 20, 2012 at 12:58 AM, Igor Tandetnik wrote: > >> On 9/19/2012 12:51 PM, joe.fis...@tanguaylab.com wrote: >> >>> Too bad SQLite doesn't yet support SQL Window Functions. >>> >>> Are

Re: [sqlite] SQL:2003 -- Window Functions

2012-09-19 Thread Mohd Radzi Ibrahim
On Thu, Sep 20, 2012 at 12:58 AM, Igor Tandetnik wrote: > On 9/19/2012 12:51 PM, joe.fis...@tanguaylab.com wrote: > >> Too bad SQLite doesn't yet support SQL Window Functions. >> >> Are there any SQLite Extension Libraries that support "SQL:2003 type >> Window Functions"? >>

Re: [sqlite] SQL:2003 -- Window Functions

2012-09-19 Thread Igor Tandetnik
On 9/19/2012 12:51 PM, joe.fis...@tanguaylab.com wrote: Too bad SQLite doesn't yet support SQL Window Functions. Are there any SQLite Extension Libraries that support "SQL:2003 type Window Functions"? I specifically need LEAD and LAG to calculate an event integer timestamp delta between

[sqlite] SQL:2003 -- Window Functions

2012-09-19 Thread joe.fis...@tanguaylab.com
Too bad SQLite doesn't yet support SQL Window Functions. Are there any SQLite Extension Libraries that support "SQL:2003 type Window Functions"? I specifically need LEAD and LAG to calculate an event integer timestamp delta between consecutive rows. I've played with some self-join code but