Hi, I have a dataset which has duplicates records, the only field which differentiates them is the latest date and time . Now, ask is to get latest record , I tried sorting and then fetching Unique but it is not picking up latest date.
Field 1 | Field 2 |
a | 11-12-2024 15:45 |
a | 15-12-2024 04:31 |
a | 15-12-2024 04:32 |
Unique will always take the first record for each ID. Try reversing your sort order.