I have a database that I created with the following codes.
LOAD CSV WITH HEADERS FROM 'FilmData.csv' AS line
MERGE (n:Movie{title:line.Film_Adi_TR,yabanci_isim:coalesce(line.Film_Adi_Yabanci,"Yabancı İsim Yok"),released:line.Vizyon_Tarihi,numberOfAudience:line.Seyirci_Sayisi,TotalRevenue:line.Toplam_Hasilat,IMDb:line.IMDb,Screening_Week:line.Gosterim_Hafta,CountryOfManufacture:line.Yapimci_Ulke})
WITH n, split(line.Yapimci,",") as manufacturers, split(line.Yonetmen,",") as directors,split(line.Film_Turu,",") as genres,split(line.Oyuncular,",") as players
UNWIND manufacturers as m
UNWIND directors as d
UNWIND genres as g
UNWIND players as p
MERGE (y:Yapimci{title: m})
MERGE (yntmn:Yonetmen{title: d})
MERGE (gnrs:Film_Turu{title: g})
MERGE (o:Oyuncular{title: p})
MERGE (n)-[:Yapımcı]->(y)
MERGE (n)-[:Yönetmen]->(yntmn)
MERGE (n)-[:FilmTürü]->(gnrs)
MERGE (n)-[:Oyuncusu]->(o)
I want to list movies directed by the same director, but I'm getting an error. Can you help me?
match (n:Yonetmen)
where n.title="Stephen King"
match n-[:WRITE]->Movie
return Movie
Neo.ClientError.Statement.SyntaxError Invalid input 'n': expected "(", "ALL", "ANY" or "SHORTEST" (line 3, column 7 (offset: 54)) "match n-[:WRITE]->Movie" ^
I'm new to Neo4j and I couldn't solve the problem.
You must have parentheses around the nodes in the match, so it should be like this: