SQL query to get most

Posted by chama on Stack Overflow See other posts from Stack Overflow or by chama
Published on 2010-04-29T18:45:12Z Indexed on 2010/04/29 18:47 UTC
Read the original article Hit count: 164

Filed under:
|

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!

© Stack Overflow or respective owner

Related posts about sql

Related posts about SQLServer