I want to know the name of the department that has the max
number of employees in my database, the query I use is the following:
select depart.dnombre,
count(*)
from emple
inner join depart
on emple.DEPT_NO = depart.DEPT_NO
group by depart.DNOMBRE
having count(*) = (select max(count(emple.emp_no))
from emple
)
And the error is Invalid use of group function
, to see if you could lend me a hand, thanks in advance.