I have a table 'example' which looks like this
id index date number
============================
1 10 2016-01-01 26
2 10 2016-01-02 0
3 10 2016-01-03 26
4 11 2016-01-01 39
I wish to find the record which was updated wrongly. In this case it is the row with id 2(as you can see the next and previous date values for 'number' column are same for the query select * from example where index=10 order by date desc);