match (a {species:"droid"})-[:touches]-(b)-[:touches]-(c {species:"alien"})
return distinct b.name;
or, alternately:
match (a {species:"droid"})-[:touches]-(b)
match (c {species:"alien"})-[:touches]-(b)
return distinct b.name;
match (a:Character)-[r:touches]->(b:Character)
return r.ep, count(*) order by count(*) desc;
match (a:Character)-[r:speaksTo]->(b:Character)
return r.ep, count(*) order by count(*) desc;
match (a)-[r:appearsWith]->(b)
return a.name, b.name, count(distinct r.loc);
match (a:Character)-[r:mentions]->(b:Character)
return a.name, b.name, count(*) order by count(*) desc;
match (a:Character {species:"human"})-[r:speaksTo|mentions]->(b:Character {species:"wookie"})
return a.name, type(r), b.name, count(*);
match (a)-[{ep:"IV"}]-(b),
(a)-[{ep:"V"}]-(b),
(a)-[{ep:"VI"}]-(b)
return distinct a.name, b.name;
related:
match (a)-[rIV {ep:"IV"}]-(b),
(a)-[rV {ep:"V"}]-(b),
(a)-[rVI {ep:"VI"}]-(b)
return distinct a.name, type(rIV) as IV, type(rV) as V, type(rVI) as VI, b.name;