title: SQL Select highest value where duplicate ID
body: <p>I have a SQL table with the columns:</p>
  
  <pre><code>ID,        DayNumber, Mfm, value
  432080971, 1,         15,  57
  432080971, 1,         15,  59
  432080978, 3,         15,  54
  432080978, 4,         45,  54
  </code></pre>
  
  <p>Unfortunately there are some duplicated entries. What I'd like is a select statement that returns the table without duplicated ID, Daynumber and Mfm, and where if there is a double entry to select the row with the higher value.</p>
  
  <p>So, as an example the above entries would be returned as:</p>
  
  <pre><code>ID,        DayNumber, Mfm, value
  432080971, 1,         15,  59
  432080978, 3,         15,  54
  432080978, 4,         45,  54
  </code></pre>
  
  <p>I'm using sql server management studio running sql server 2012</p>