Files
secondo/Algebras/PropertyGraph2/sample-orderedrelations/sample-dblp/match3-coauthors
2026-01-23 17:03:45 +08:00

21 lines
535 B
Plaintext

#open database pgraph2;
#query meminit (1524);
#query p2 loadgraph;
# Queries the top 5 co-authors of publications of "Ralf Hartmut Gueting"
# The results will be grouped and show the Authors with the sum of
# joint publications.
# The query is expressed in cypher
query p2
match3 ['
MATCH
(a1 {Name:"Ralf Hartmut Gueting"})-[:AUTHOR_OF]->(doc:Document)<-[:AUTHOR_OF]-(a)
WHERE a.Name <> "Ralf Hartmut Gueting"
RETURN a.Name
']
sortby[Name] groupby[Name; Cnt:group count] sortby[Cnt:desc] head[5] consume;