title: How can I select only the first row from each subset of partially distinct values?
body: <p>I have sql database having four columns as given below:</p>
  <pre><code>  A   B    C   D
  1038 496 4789 10 
  1303 496 6678 10 
  1852 496 1645  8 
   982 496 5203  8
   427 496 5574  8 
    81 496 6908  7 
  1264 496 2740  5 
  1491 496 6408  4     
  1198 496 9766  3
  </code></pre>
  <p>As you can see first and second rows have <code>B</code> and <code>D</code> columns with same values.</p>
  <p>I want to select only one row from these two rows having lesser <code>C</code> value.</p>
  <p>same I want to do with 3rd 4th and 5th row. How to do it?</p>