Tutorial 4, page 15 Context: jobsEngine: oracle

Write a query which shows which empno has been to the most courses. List the empno and the number of courses that person has been on. There may be multiple employees with the biggest count.

You should make use of HAVING. For instance, to show the depno and the number of employees in that depno for only the biggest department you could do:

SELECT depno,count(*)
from employee
group by depno
having count(*) = (
  select max(count(*))
  from employee
  group by depno
);
Active SQL index Previous Question Next Question

SQL To Be Executed