結果 : sql compare previous row with current