Created
October 28, 2022 12:02
-
-
Save jmfloreszazo/cdccdf8785b6d11b7fdd6f4788cba1be to your computer and use it in GitHub Desktop.
dotNetMLG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (n) -[r] -> () DELETE n, r | |
MATCH (n) DELETE n | |
CREATE(CityA:City { name: "City-A"}) | |
CREATE(CityB:City { name: "City-B"}) | |
CREATE(P1:Person { name: "Person-1"}) | |
CREATE(P2:Person { name: "Person-2"}) | |
CREATE(P3:Person { name: "Person-3"}) | |
CREATE(P4:Person { name: "Person-4"}) | |
CREATE(P5:Person { name: "Person-5"}) | |
CREATE | |
(CityA)-[:BORN]->(P1), | |
(CityA)-[:BORN]->(P3), | |
(CityA)-[:BORN]->(P5) | |
CREATE | |
(CityB)-[:BORN]->(P2), | |
(CityB)-[:BORN]->(P4) | |
CREATE(EmployerA:Employer { name: "Employer-A"}) | |
CREATE(EmployerB:Employer { name: "Employer-B"}) | |
CREATE(EmployerC:Employer { name: "Employer-C"}) | |
CREATE | |
(EmployerA)-[:EMPLOYED]->(P1), | |
(EmployerA)-[:EMPLOYED]->(P5), | |
(EmployerB)-[:EMPLOYED]->(P1), | |
(EmployerB)-[:EMPLOYED]->(P3), | |
(EmployerB)-[:EMPLOYED]->(P5), | |
(EmployerC)-[:EMPLOYED]->(P2), | |
(EmployerC)-[:EMPLOYED]->(P5) | |
MATCH (n) RETURN n | |
MATCH (n) MATCH (n)-[r]-() RETURN n, r | |
MATCH(city:City { name: "City-B"})-[:BORN]->(person:Person)<-[:EMPLOYED]-(employer:Employer) | |
RETURN distinct person.name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment