title: How to GROUP BY without breaking order?
body: <p>I have a very simple ordered table with the following data:</p>
  
  <pre><code>=============================
  |   Timestamp  |    Count   |
  =============================
  |   12/30/2016 |    322     |
  |   12/29/2016 |    322     |
  |   12/28/2016 |    322     |
  |   12/4/2016  |    541     |
  |   12/3/2016  |    541     |
  |   12/2/2016  |    541     |
  |   12/1/2016  |    322     |
  |   11/30/2016 |    322     |
  |   11/29/2016 |    322     |
  =============================
  </code></pre>
  
  <p>I would like to <code>SELECT MAX([Timestamp]), Count FROM [dbo].[Table] GROUP BY [Count]</code> without breaking <code>[Timestamp]</code> order, i.e. the output should be:</p>
  
  <pre><code>=============================
  |   Timestamp  |    Count   |
  =============================
  |   12/30/2016 |    322     |
  |   12/4/2016  |    541     |
  |   12/1/2016  |    322     |
  =============================
  </code></pre>
  
  <p>So <code>12/1/2016 | 322</code> is not hidden by the <code>GROUP BY</code>. 
  Does anybody know how to write such query? I need an EntityFramework Linq query and it would be great to know a T-SQL analogue.</p>