title: How to select top 3 maximum values from SQL Server column
body: <p>I have values in SQL Server derived column sorted as descending i.e.</p>
  
  <pre><code>id   Count    OR     id   Count    OR     id   Count
  1    4               1    5               1    11
  2    4               2    2               2    1
  3    4               3    1               3    1
  4    4               4    1               4    1
  5    4               5    1               5    1
  </code></pre>
  
  <p>Now I want to select top 3 maximum values. How can I select so that query returns consistent result every time.<br>
  For example if values of <code>Count</code> are same which <code>id</code>'s should be returned as top 3 maximums, similarly if 3rd value is matched with other values and if 2nd value is matched with other values then which <code>id</code>'s should be returned by the query. And the result should be consistent every time I execute the query.  </p>