Have a table like this:

create table TABLE1([ID] INTEGER, [ISO8601_DATE] TEXT, [INT_VALUE] INTEGER)
with data like this:

ID     ISO8601_date    INT_VALUE
----------------------------------------------------
1       2016-01-01         10
1       2016-01-28          9
1       2016-03-05          12
1       2016-05-12          11
2       2016-01-01          12
2       2016-02-02          10
2       2016-03-05          12
2       2016-04-07          14

The date column is in the format yyyy-mm-dd.

Now I want to select the unique ID values that have 2 consecutive rises in
INT_VALUE.
A rise will need to be a higher value on the next date, but not on the same
date.
So in the above data the result would be 2 only as that has 2 rises on
consecutive dates.

Any suggestions how this can be done?

RBS
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to