Hi, I was asked to do a stupid job that need to find the staff no and office no of a staff that has 5 or more job on hand. I can find the result by a simple query as below, but I am asked not to use simple query to do this. ie. replacing the Group by or Having clause with subquery. Actually, I don't know how to do so. Can anyone help?
select staff_no, office_no, count(job_id)
group by staff_no, office_no
HAVING count(job_id) >= 5