query-7c3fef20fcbd3c226a84535383e7b98d
All museums (including subclass of museum) in Washington, D.C. with coordinates
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT ?item ?name ?coord ?lat ?lon
WHERE {
?item wdt:P131* wd:Q61 .
?item wdt:P31/wdt:P279* wd:Q33506 .
?item wdt:P625 ?coord .
?item p:P625 ?coordinate .
?coordinate psv:P625 ?coordinate_node .
?coordinate_node wikibase:geoLatitude ?lat .
?coordinate_node wikibase:geoLongitude ?lon .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
?item rdfs:label ?name
}
}
ORDER BY ASC (?name)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coord"):::projected
v4("?coordinate")
v5("?coordinate_node")
v2("?item"):::projected
v6("?lat"):::projected
v7("?lon"):::projected
v1("?name"):::projected
a1((" "))
c5(["wd:Q33506"]):::iri
c2(["wd:Q61"]):::iri
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"p:direct/P131"--> c2
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c5
v2 --"p:direct/P625"--> v3
v2 --"p:P625"--> v4
v4 --"p:statement/value/P625"--> v5
v5 --"wikibase:geoLatitude"--> v6
v5 --"wikibase:geoLongitude"--> v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
v2 --"rdfs:label"--> v1
end