title: delete distinct by column sQL
body: <p>I want to delete min Id if there is multiple employeeId. How can i do that in sQL query? Attacted my SQL query result</p>
  
  <pre><code>delete @CompPayDetEE where exists (select 1 from @CompPayDetEE group by AppEmployeeId )
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/9oKN5.png" alt="SQL Result"></p>