Just started learning about graph databases and can't solve this most likely very easy problem (real-world) - any help would be greatly appreciated.
Problem
Given Node X find Subset Y.

Using a Neo4j Cypher Query - Direct Image Link
Just started learning about graph databases and can't solve this most likely very easy problem (real-world) - any help would be greatly appreciated.
Problem
Given Node X find Subset Y.

Using a Neo4j Cypher Query - Direct Image Link
The query below returns your 'X' node, and a collection of the other nodes labeled A that are also liked by the same B nodes.
MATCH (a:A)<-[:likes]-(:B)-[:likes]->(otherA:A)
WHERE a.id = 'X'
RETURN a, COLLECT(otherA)
I assume here that you identify your A nodes by an id property. There is no need to explicitly make sure that otherA is never the same as a, since Cypher does that for you automatically (see manual).