I kind of understand how to find duplicates but I need to delete all but the one with the highest sub value in a separate row.
+------------+---------------+
| ID | Expiration |
+------------+---------------+
| 828044 | 5020581708 |
| 586536 | 1672700156 |
| 586536 | 1672700259 |
| 586536 | 1672700300 |
| 828044 | 1672700400 |
+------------+---------------+
Again I want to sort by the ID then save the one with the highest Expiration and delete the rest. Table looks like that. Any thoughts?