Queries INGINIOUS WRONG VERSION AND WRONG DB ?????

This commit is contained in:
Brieuc Dubois 2024-05-15 17:41:33 +02:00
parent 9ff77877b4
commit 173201ef82
1 changed files with 11 additions and 7 deletions

View File

@ -1,6 +1,7 @@
# 1 # 1
MATCH (:Country {name:"Greece"})-[:Borders]->(c:Country)<-[e:Encompasses]-(k:Continent WHERE k.name <> 'Europe' OR e.percentage <> "100.0") MATCH (k:Continent {name:"Europe"})-[e:Encompasses]->(c:Country)-[:Borders]->(:Country {name:"Greece"})
WHERE e.percentage <> "100.0"
RETURN DISTINCT c.name; RETURN DISTINCT c.name;
# 2 - VALID # 2 - VALID
@ -9,14 +10,16 @@ MATCH (:Country {name:"China"})-[:Borders]->(c:Country)-[:Borders]->(c2:Country)
WHERE c.name < c2.name WHERE c.name < c2.name
RETURN c.name, c2.name; RETURN c.name, c2.name;
# 3 # 3 - VALID
MATCH (:Continent {name:"Europe"})-[:Encompasses {percentage:"100.0"}]->(c:Country)-[:Borders]->(:Country)<-[e:Encompasses]-(k:Continent WHERE k.name <> "Europe" OR e.percentage <> "100.0") MATCH (:Continent {name:"Europe"})-[:Encompasses {percentage:100.0}]->(c:Country)-[:Borders]->(:Country)<-[e:Encompasses]-(k:Continent)
WHERE k.name <> "Europe" OR e.percentage <> 100.0
RETURN DISTINCT c.name; RETURN DISTINCT c.name;
# 4 # 4 - VALID
MATCH (:Country {name:"Turkey"})-[:Borders *..2]->(c:Country WHERE c.name <> "Turkey")<-[:Encompasses]-(k:Continent {name:"Asia"}) MATCH (:Country {name:"Turkey"})-[:Borders *..2]->(c:Country)<-[:Encompasses]-(k:Continent {name:"Asia"})
WHERE c.name <> "Turkey"
RETURN DISTINCT c.name RETURN DISTINCT c.name
ORDER BY c.name; ORDER BY c.name;
@ -40,9 +43,10 @@ LIMIT 1;
MATCH p=shortestPath((:Country {name:"Belgium"})-[:Borders *]->(:Country {name:"China"})) MATCH p=shortestPath((:Country {name:"Belgium"})-[:Borders *]->(:Country {name:"China"}))
RETURN p; RETURN p;
# 8 # 8 - VALID
MATCH p=shortestPath((:Country {name:"Belgium"})-[:Borders *]->(d:Country WHERE d.name <> "Belgium")) MATCH p=shortestPath((:Country {name:"Belgium"})-[:Borders *]->(d:Country))
WHERE d.name <> "Belgium"
RETURN d.name RETURN d.name
ORDER BY length(p) DESC ORDER BY length(p) DESC
LIMIT 1 LIMIT 1