Created
August 8, 2019 22:57
-
-
Save kasei/5527e3e1f550ae964a34f7bd0e9876a5 to your computer and use it in GitHub Desktop.
SPARQL* syntax used for Wikidata reification
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
# Using SPARQL* syntax: | |
SELECT ?speed ?qualifierLabel WHERE { | |
<< wd:Q183 wdt:P3086 ?speed >> | |
pq:P3005 ?qualifier ; | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } | |
} | |
# becomes Wikidata reification: | |
SELECT ?speed ?qualifierLabel WHERE { | |
wd:Q183 | |
wdt:P3086 ?speed ; | |
p:P3086 [ | |
ps:P3086 ?speed ; | |
pq:P3005 ?qualifier ; | |
] . | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code from the SPARQLSyntax sparql-star-wikidata branch (kasei/swift-sparql-syntax@5786f85; available as a docker image).