I have been looking all over the community a post that could solve me this probelm.
I have one table that contains personal information as follows:
Name;age;direction;
Marc,22;London;
Mike;33;Paris;
Adam;45;Madrid;
Laure;34;Londo (etc etc)
LOAD CSV WITH HEADERS FROM 'file:///persons.csv' AS per FIELDTERMINATOR ';'
CREATE (p:PERSONS { Name:per.name, Age:per.age, Dir:per.directions})
Once I load this table, I create the label PERSONS.
Then I want to create another label called just DIRECTIONS that have all the different locations of all my persons: i.e.: London, Madrid, Paris, Berlin...
I want to create this new label by selecting from the same table as before just the columns directions. My problem is that I can't code not to select duplicates, so I am a little bit stuck.
LOAD CSV WITH HEADERS FROM 'file:///persons.csv' AS per FIELDTERMINATOR ';'
CREATE (d:DIRECTIONS { Dir:per.directions})
Thanks for the help!!!