Learning CYPHER, so this is probably a beginner level question...
My Person node can have an arc to an A node, which has a name. It can also have an arc to a B node, which likewise has a name. How do I find Persons who have at least one A arc and at least one B arc, so I can get the names from the A and B nodes?
This is a template, you can add labels to node, and relations type between node if they are useful :)
The query return the name of the Person and a list of names for a and b.
MATCH (a)--(p:Person)--(b)
RETURN p.name AS p_name, collect(a.name) AS a_names, collect(b.name) AS b_names