title: SQL Subquery greater than/less than operators
body: <p>I'm currently trying to simply query <code>jobname</code> and <code>jobid</code> via a <code>GROUP BY</code> function. I employ a subquery with <code>COUNT(jobID) &gt;2</code>. Despite this, the output is still displaying values of 2. I understand I can use HAVING with this, but I am genuinely interested as to why this is not working.</p>
  
  <pre><code>SELECT EmployeeType.jobName, COUNT(Employee.JobID) FROM Employee, EmployeeType WHERE (Employee.jobID = EmployeeType.jobID) AND (SELECT COUNT(Employee.jobID) FROM Employee) &gt; 2 GROUP BY EmployeeType.JobName;
  </code></pre>
  
  <p>Output:
  <a href="https://i.stack.imgur.com/ovPNi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ovPNi.png" alt="enter image description here"></a></p>