query-79ddc6332c2f43ca5a6d3acb1faab0d1

rq turtle/ttl

Follow-up question: it wasn't quite bringing up all the results I expected because some are subclasses of Q12323 instead of direct instances. So I added /wdt:P279* to the query as below:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?item ?itemLabel (SAMPLE(?coordinate) as ?coord)
WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?item wdt:P31/wdt:P279* wd:Q12323.
  ?item wdt:P131/wdt:P131* wd:Q127513.
  ?item wdt:P625 ?coordinate.
}
GROUP BY ?item ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?coord") v2("?coordinate"):::projected v1("?item"):::projected a1((" ")) a2((" ")) c2(["bd:serviceParam"]):::iri c9(["wd:Q127513"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal c7(["wd:Q12323"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c7 v1 --"wdt:P131"--> a2 a2 --"wdt:P131"--> c9 v1 --"wdt:P625"--> v2 bind1[/"sample(?coordinate)"/] v2 --o bind1 bind1 --as--o v3