I have a SQL Server table that has duplicate entries in one of the columns e.g.:
+----+-----------+------------+ | id | object_id | status_val | +----+-----------+------------+ | 1 | 1 | 0 | | 2 | 1 | 0 | | 3 | 1 | 0 | | 4 | 2 | 0 | | 5 | 3 | 0 | | 6 | 4 | 0 | | 7 | 4 | 0 | +----+-----------+------------+ I need the output to be like this:
+----+-----------+------------+ | id | object_id | status_val | +----+-----------+------------+ | 4 | 2 | 0 | | 5 | 3 | 0 | +----+-----------+------------+ How to resolve this?