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

28 lines
718 B
Plaintext

#open database pgraph2;
#query meminit (1524);
#query p2 loadgraph;
# Queries the top 5 co-authors publications of "Ralf Hartmut Gueting"
# The results will be grouped and show the Authors with the sum of
# joint publications.
# The starting nodes for the subgraph match are taken from the
# tuple stream (first argument).
# Note the direction argument "<-" to match an edge in reverse direction.
query p2
Author feed
match1 ['
(
( Author ( (Name "Ralf Hartmut Gueting") ) )
AUTHOR_OF
( (doc Document)
AUTHOR_OF <-
( (a Author) )
)
)',
'( ((a Name) <> "Ralf Hartmut Gueting") )',
'( ((a Name) Name) )'
]
sortby[Name] groupby[Name; Cnt:group count] sortby[Cnt:desc] head[5] consume;