I have a code bias, methinks, so I don't see a query solution. Not even a subquery solution, but then I've seen some do wonderful query things in this forum.
If it comes down to code, I can see a recordset ordered by ID, and a loop that
- gets the first ID and value and assigns to variables
- moves to the next record and compares the pair to the variables
- if the same, repeat.
- if not, what if the ID changes but the value does not?
when the value changes and the ID is the same, you already have the prior value and ID in the variables.
You then do something with the 4 values - not sure what 'return rows' means. The lack of a record numbering field probably will make that more difficult. Maybe very much so.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.