in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

analytic lag and lead functions

Last post 05-11-2010 8:06 AM by superbem. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 05-11-2010 8:06 AM

    analytic lag and lead functions

     Hello,

     I'm recently started using sqlite with great pleasure for its simplicity and response.

    But i now find that it don't have the lag and lead functions.

    LEAD (expression, <offset>, <default>) LEAD is the opposite of LAG. Whereas LAG gives you access to the a row preceding yours in a group - LEAD gives you access to the a row that comes after your row. Offset is a positive integer that defaults to 1 (the next row). Default is the value to be returned if the index is out of range of the window (for the last row in a group, the default will be returned). 

     

    And that are very usefull, isn't it to be implemented, or some workarround?

    Like auto-creating a temp table and then joining the lead/lag field in the result?

    That would be very nice =)

Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems