title: SELECT TOP 2 MAX Value Group By SQL
body: <p>I have the following table:<br></p>
  
  <pre><code>-----------------------------------------
  xDate        xItem       xCount
  -----------------------------------------
  2018-01-01   A           100
  2018-01-01   B           200
  2018-01-01   D           500
  2018-01-02   C           200
  2018-01-02   E           800
  </code></pre>
  
  <p>I want to select TOP 2 value for each date on the MAX value of xCount field. So, the result should be:<br></p>
  
  <pre><code>-----------------------------------------
  xDate        xItem      xCount
  -----------------------------------------
  2018-01-01   D          500
  2018-01-01   B          200
  2018-01-02   E          800
  2018-01-02   C          200
  </code></pre>
  
  <p>Does anyone have an idea for this case?<br>
  Cheers,</p>