Count common nodes and properties

Hi there,

I have a Neo4j Database containing Candidates, Jobs, Techs, Cities and Focus.
image

What I want is to count how many relationships and propeties a Candidate have in common with a Job relative to all Job nodes and properties.

Example:

Candidate A

  • (PROPERTY) has salary 3000
  • (RELATIONSHIP) is connected to Tech A, B and C
  • (RELATIONSHIP) is connected to City D
  • (RELATIONSHIP) is connected to Focus F

Job J

  • (PROPERTY) has min salary 2000 and max salary 4000
  • (RELATIONSHIP) is connected to Tech A
  • (RELATIONSHIP) is connected to Focus F

Candidate have matches the salary property from Job, and all its relationships.
So in this case the result would be 100%.

Try this:

match (c:Candidate)
where 2000 <= c.salary <= 4000

match(c)-[]-(t:Tech)
where t.name = "A"

match(c)-[]-(f:Focus)
where f.name = "F"

return c, t, f