I am relatively new to neo4j and I am working on 1 Use case where we are trying to merge all nodes(with 1 common property, such as all nodes with year= "1995") into 1 node where all the relationships are heading towards it rather than 3 different nodes.
I have 3 csv files with below type of data.
|Movie Id||Movie Name||Year||Actor Id||Director Id|
|Director ID||Director Name|
Now if I use the following Cypher Query:-
return actor, movie, director
Now the graph that appears have 1 node of actor and 3 nodes of movie then 1 node of director.
all connected via relationships.
I want there to be only 1 node of movie displaying "2016" as year and 3 edges/relationships going out of actor to the movie node and 3 edges/relationships merging as 1 into Director node
1 single relationship of "ACTED_IN" going towards movie but a number "3" (suggesting there are 3 relationships for that year) written over it
The main goal is to show that there are 3 realtionships related to the year 2016.
I know we can perform aggregations to return tables with count or arrays of data.
But can we do it in graph nodes as well.
NOTE:-I am using Neo4j Browser version 3.1.4
Thank you for reading I hope it's not a silly question.