I used LinqPad, which uses Linq-to-SQL instead of Linq for Entities, but the concepts should be the same.
Firstly, the data that I used for testing.
create table People (PersonID int, Name varchar(100)) create table Skills (SkillID int, Skill varchar(100)) create table PeopleSkills (PeopleSkillsID int, PersonID int, SkillID int) insert People values (1,'Bert'),(2,'Bob'),(3,'Phil'),(4,'Janet') insert Skills values (1,'C#'),(2,'Linq'),(3,'SQL') insert PeopleSkills values (1,1,1),(2,1,2),(3,1,3),(4,2,1),(5,2,3),(6,3,2),(7,3,3),(8,4,1),(9,4,2),(10,4,3)
And the solution.