title: how to get 5th maximum value from a table in sql?
body: <p>I have a table named <code>Products</code>, which has a column <code>Prices</code>. 
  How to get 5th maximum value from that table?</p>
  
  <p>I've found two methods:</p>
  
  <p><strong>=1=</strong> </p>
  
  <pre><code>select max(id) 
  from EMP A 
  where 5=( select count(distinct(id)) 
            From EMP  B 
            where B.ID&gt;=A.ID )
  </code></pre>
  
  <p><strong>=2=</strong>  </p>
  
  <pre><code>SELECT * 
  FROM Products Price1 
  WHERE (4) = (SELECT COUNT(DISTINCT(Price2.Price))
               FROM products Price2 
               WHERE Price2.Price &gt; Price1.Price)
  </code></pre>