Tell us please what u mean by "next row"?
How are they ordered so that we know what is "next"
Support malay_biswal, from what u have posted seems that either u have just 2 rows per ID or u do not know what u need

Regards