SELECT P.pID FROM Department D, Professor P
WHERE D.dID = P.dID
ORDER count(pID);
Mysql, keeps throwing an error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘count(pID)
LIMIT 0, 30’ at line 3
You are missing a BY.
The query should be: