SPARQL Test: Difference between revisions
Jump to navigation
Jump to search
((by SublimeText.Mediawiker)) |
((by SublimeText.Mediawiker)) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 61: | Line 61: | ||
}} | }} | ||
<!-- | |||
== Trying to query BCA endpoint == | == Trying to query BCA endpoint == | ||
{{#sparql: | {{#sparql: | ||
Line 79: | Line 79: | ||
LIMIT 5 | LIMIT 5 | ||
|log=2 | |log=2 | ||
}} | }} | ||
Line 103: | Line 101: | ||
|debug=YES | |debug=YES | ||
}} | }} | ||
--> |
Latest revision as of 20:41, 20 April 2022
✅ Sample Wikidata Query
{{#sparql: PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX psv: <http://www.wikidata.org/prop/statement/value/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX bd: <http://www.bigdata.com/rdf#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> select distinct ?lat ?long ?presidentLabel where { ?president wdt:P39 wd:Q191954 ; wdt:P19 ?villeNaissance ; p:P39 ?s . ?villeNaissance p:P625 ?coord . ?coord psv:P625 ?coordValue . ?coordValue a wikibase:GlobecoordinateValue ; wikibase:geoLatitude ?lat ; wikibase:geoLongitude ?long . SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" . } } |config=http://www.wikidata.org }}
{{#sparql: PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX psv: <http://www.wikidata.org/prop/statement/value/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX bd: <http://www.bigdata.com/rdf#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/>
select distinct ?lat ?long ?presidentLabel where {
?president wdt:P39 wd:Q191954 ; wdt:P19 ?villeNaissance ; p:P39 ?s .
?villeNaissance p:P625 ?coord . ?coord psv:P625 ?coordValue . ?coordValue a wikibase:GlobecoordinateValue ; wikibase:geoLatitude ?lat ; wikibase:geoLongitude ?long .
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" . }
} |config=http://www.wikidata.org }}