geocode/templates/sparql/scottish_parish.sparql

9 lines
367 B
SPARQL
Raw Normal View History

2021-04-16 21:24:59 +01:00
SELECT ?item ?itemLabel ?commonsSiteLink ?commonsCat WHERE {
?item wdt:P528 "{{ code }}" .
?item wdt:P31 wd:Q5124673 .
OPTIONAL { ?commonsSiteLink schema:about ?item ;
schema:isPartOf <https://commons.wikimedia.org/> }
OPTIONAL { ?item wdt:P373 ?commonsCat }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}