title: Return sum of multiple values and corresponding category field of max value
body: <p>I have the following data</p>
  
  <pre><code>ID  CATEGORY VALUE
  x   A        10
  x   B        2
  x   C        1
  y   B        11
  y   A        6
  z   D        13
  z   E        0
  </code></pre>
  
  <p>I would like to group by <strong>ID</strong> and <strong>Category</strong> such that <strong>Value</strong> is summed for a single <strong>ID</strong> and the <strong>Category</strong> returned is that of the corresponding max <strong>Value</strong> within the <strong>ID</strong> group.</p>
  
  <p>The results would look like this.</p>
  
  <pre><code>ID  CATEGORY    VALUE
  x   A           13
  y   B           17
  z   D           13
  </code></pre>
  
  <p>Is this possible in SQL?</p>
  
  <p>Thanks</p>