Mohd Radzi Ibrahim <imra...@gmail.com> wrote: > On Thu, Sep 20, 2012 at 12:58 AM, Igor Tandetnik <itandet...@mvps.org>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"? >>> 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 that's proving to be complicated. >>> >> >> The easiest approach is to maintain the window in your application code, >> as you iterate over a simple SELECT statement. >> > Could it not be done with inner select
Yes it could, and in fact the OP has stated that he "played with some self-join" but was unhappy with the approach. Such complicated queries also tend to run noticeably slower than a straightforward linear pass. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users