title: How to delete duplicate rows in SQL Server with condition?
body: <p>I have a table like this:</p>
  
  <pre><code>Id   GroupId  StdId  Active
  ---------------------------
  1    1        1      true
  2    1        2      false
  3    1        1      false
  4    1        1      false
  5    1        1      true
  6    1        2      true
  </code></pre>
  
  <p>I want to delete duplicate row but if Active have true/false value keep true value and delete false value. </p>
  
  <p>For example I want to this list</p>
  
  <pre><code>Id   GroupId  StdId  Active
  ---------------------------
  1    1        1      true
  6    1        2      true
  </code></pre>