7,354
edits
No edit summary |
|||
Line 534: | Line 534: | ||
} | } | ||
ORDER BY ?personLabel | ORDER BY ?personLabel | ||
</sparql> | |||
===All places (by coordinate location on wikidata)=== | |||
<sparql tryit="1"> | |||
# All places (by coordinate location on wikidata) | |||
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | |||
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/> | |||
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/> | |||
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/> | |||
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/> | |||
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | |||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | |||
PREFIX wdt: <http://www.wikidata.org/prop/direct/> | |||
PREFIX wd: <http://www.wikidata.org/entity/> | |||
PREFIX p: <http://www.wikidata.org/prop/> | |||
PREFIX pr: <http://www.wikidata.org/prop/reference/> | |||
PREFIX prov: <http://www.w3.org/ns/prov#> | |||
SELECT ?place ?placeLabel ?WDitem ?WDcoordinate_location | |||
WHERE { | |||
?place bnwdt:P33 ?admin_area . #select items with 'located in the administrative territorial entity' statements | |||
?place bnwdt:P117 ?Qnumber . #get wikidata ID | |||
#create reference to Wikibase entity | |||
BIND(IRI(concat("http://www.wikidata.org/entity/", ?Qnumber)) as ?WDitem ) | |||
#on Wikibase do | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
?WDitem wdt:P625 ?WDcoordinate_location . #get coordinate location on wikidata | |||
} | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | |||
GROUP BY ?place ?placeLabel ?WDitem ?WDcoordinate_location | |||
ORDER BY ?placeLabel | |||
</sparql> | </sparql> |