I need your help in neo4j project. I made two nodes Artist and Song. The relationship of these nodes is
(a:Artist)-[:SING]->(s:Song) I want to find all artists with shortest path lengths > 25 from artist ‘John Lennon’. The shortest paths will be calculated only on edges between artists and songs. Also, I want to return artist name, the length and the song titles for each path. I tried the bellow
MATCH (a:Artist { name: 'John Lennon' }), p = shortestPath((a)-[:SING*]-(s:Song))
WHERE ALL (r IN relationships(p) WHERE EXISTS (r.role)) AND length(p) > 25
RETURN a.name as artist ,length(p) as length, s.title
or
MATCH (a:Artist)-[SING*]->(s:Song)
,(Lennon:Aartist),
p = shortestPath((Lennon)-[*]-())
WHERE a.name='John Lennon' AND length(p) > 25
RETURN a.name as artist ,length(p) as length, s.title
But they didn't work.
Any idea what I did wrong?