Smalyshev added a comment.
Is there a way to to traversals and aggregation in SPARQL? I.e. Cypher examples:
This is list of all professions. Note the '*' there:
MATCH (v:item {wikibaseId: 'Q28640'})<-[:claim|P279|P31*]-(v2:item) RETURN
v2.wikibaseId, v2.labelEn;
This is list of countries by latest population data:
MATCH (v:item)-[:claim]->(c:claim:P31 {value: "Q6256"})
MATCH (v)-[:claim]->(c2:claim:P1082) WHERE has(c2.value)
WITH v as v, max(c2.P585q) as latest
MATCH (v)-[:claim]->(cv:claim:P1082)
WHERE cv.P585q = latest
RETURN v.wikibaseId, v.labelEn, cv.value, cv.P585q
ORDER BY cv.value DESC
I wonder how these would look like qith SPARQL.
TASK DETAIL
https://phabricator.wikimedia.org/T88717
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign
<username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Smalyshev
Cc: Beebs.systap, Aklapper, Manybubbles, jkroll, Smalyshev, Wikidata-bugs,
Jdouglas, aude, GWicke, daniel, JanZerebecki
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs