In the below given table, I wanna compare two records eg. Record 190 and 191 so for each pair I have two historical status in last column, I wanna compare those pairs and then i wanna check that the NO status record's data should be recent than the YES status pack.
I have sorted the data that in Descending order to get YES record first and then the NO record next to it.
| RecordID | Pack Id | Pack Indication Id | Regulatory Indication Id | Assessment Publication Date | Is Historical |
| 190 | 451674 | 711780 | 736715 | 23-10-2019 | YES |
| 191 | 451674 | 711780 | 736715 | 09-09-2020 | NO |
| 192 | 451675 | 711782 | 736717 | 23-10-2019 | YES |
| 193 | 451675 | 711782 | 736717 | 09-09-2020 | NO |
| 194 | 451676 | 711784 | 736719 | 23-10-2019 | YES |
| 195 | 451676 | 711784 | 736719 | 09-09-2020 | NO |
A quick response would be appreciated