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 =)