Tag: how to compare two consecutive rows in the same table