SQL query to get most
- by chama
I have a database with the following tables:
Employee (EmpID, FirstName, LastName, RegionID)
EmployeeSkills(EmpID, SkillID) [this is a linking table for the M:N relationship between Employees and skills]
Skills(SkillID, Description)
I need to list the name of the skill that most employees have. I tried doing a max(count(skillID)), sqlserver said that you can't do an aggregate function on an aggregate function. Any other ideas?
Thank you in advance!