title: SQL Server: Min/Max/Percentiles
body: <p>I'm trying to get the count, min, max, and some percentiles (10th, 25th, 50th, 75th, 90th) of base salaries for each master job title. </p>
  
  <p><a href="https://i.stack.imgur.com/Ilf0h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ilf0h.png" alt="enter image description here"></a></p>
  
  <p>I'm getting the following error:</p>
  
  <blockquote>
    <p>Msg 8120, Level 16, State 1, Line 1<br>
    Column 'dbo.ps_employee.Base' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.</p>
  </blockquote>