title: Cannot use order by in this select?
body: <p>I have this query..</p>
  
  <pre><code>SELECT ClassId, Sum(TeachersCount) as NumCount
  FROM ClassSubject 
  GROUP BY ClassId 
  ORDER BY NumCount
  </code></pre>
  
  <p>but when I run this, access pops up a box asking me the value of NumCount? But this is not a parameter, this is.. well this is the sum of teachers that can teach that class, and it is to be calculated. So why is access asking me for its (<code>NumCount's</code>) value?</p>
  
  <p>What I want is to count the number of teacher in a class and order this by increasing value of teacher count, I think that's what my query does, but why is it asking me for value of <code>NumCount</code>? One more thing, if I remove this <code>ORDER BY</code> clause, it runs fine, without asking me the value of <code>NumCount</code>? So what's the problem?</p>