MATCH (t:Task {id:{taskId}})
WITH t, size((t)-[:NEEDS_SKILL]->()) as skillCount
MATCH (t)-[:NEEDS_SKILL]->(s:Skill)<-[:HAS_SKILL]-(e:Employee)
WITH e, count(s) as skillsAvailable, skillCount
WHERE skillsAvailable = skillCount
RETURN e> Am 03.12.2015 um 14:50 schrieb Diorbert Pereira <[email protected]>: > > Hello Everyone, > > I'm starting to use Neo4j and i'm very excited about its potentials. Recently > I created a project to learn the principles about the Cypher language, but I > found a obstacle. Take as scenario the capabilities analysis domain, where > there are Employees, Skills and Tasks. Employees has skills and tasks require > skills. Very simple. The question is, how can I select all Employees that are > able to perform a specific Task? Note that to be able to perform a Task the > Employee must have all the skills required. > > Hope I made my point clear. > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
