 <p>Get them all at once:</p> <pre><code>Select e1.Employername From Employer e1 Where e1.Salary &gt; (Select avg(e2.Salary) from Employer e2 Where e2.WorkingPosition = e1.WorkingPosition)) </code></pre>