sorry if i was not clear earlier ..in the history table i have will have rows for every stage like every order goes through 10 different stages from ordering to complete.

i believe the query works when we have only 2 rows in the table but we have more.
I am looking for a query next to reprocessed row.it's always the next row and some one can reprocess an order any time.

Thanks