title: SQL query to find third highest salary in company
body: <p>I need to write a query that will return the third highest salaried employee in the company.</p>
  
  <p>I was trying to accomplish this with subqueries, but could not get the answer.  My attempts are below:</p>
  
  <pre><code>select Max(salary)
  from employees
  where Salary not in
  
   (select Max(salary)
  from employees
  where Salary not in 
  
  (select Max(salary)
  from employees));
  </code></pre>
  
  <p>My thought was that I could use 2 subqueries to elimitate the first and second highest salaries.  Then I could simply select the <code>MAX()</code> salary that is remaining.  Is this a good option, or is there a better way to achieve this?</p>