title: Query to delete last two rows as one row is duplicate in SQL Server
body: <pre><code>+-------+--------+
  | EMPID | SALARY |
  +-------+--------+
  |     1 |    100 |
  |     2 |    200 |
  |     3 |    300 |
  |     4 |    400 |
  |     4 |    400 |
  |     5 |    500 |
  +-------+--------+
  </code></pre>
  
  <p>Help me to find out the query which deletes last two rows. I have already tried using where condition but last three rows are being deleted as (4,400) is a duplicate.</p>