query-fbf0eaf21d6eb6964373ea2331f46c2c
dam (Q12323) / barrier that impounds water or underground streams SELECT DISTINCT ?item ?itemLabel ?countryLabel ?located_in_admLabel ?coordinate_location WHERE { VALUES ?instances_of { wd:Q12323 } ?item (p:P31/ps:P31) ?instances_of. OPTIONAL { ?item wdt:P17 ?country. } OPTIONAL { ?item wdt:P131 ?located_in_adm. } OPTIONAL { ?item wdt:P625 ?coordinate_location. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,fr,ru,es,ja,zh,ar". } }
ORDER BY (?countryLabel) (?located_in_adm) (?coordinate_location)
LIMIT 100
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# dam (Q12323) / barrier that impounds water or underground streams
SELECT DISTINCT ?item ?itemLabel ?countryLabel ?located_in_admLabel ?coordinate_location WHERE {
VALUES ?instances_of {
wd:Q12323
}
?item (p:P31/ps:P31) ?instances_of.
OPTIONAL { ?item wdt:P17 ?country. }
OPTIONAL { ?item wdt:P131 ?located_in_adm. }
OPTIONAL { ?item wdt:P625 ?coordinate_location. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,fr,ru,es,ja,zh,ar". }
}
#ORDER BY (?countryLabel) (?located_in_adm) (?coordinate_location)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?coordinate_location"):::projected
v3("?country")
v1("?instances_of")
v2("?item"):::projected
v4("?located_in_adm")
a1((" "))
c9(["#91;AUTO_LANGUAGE#93;,en,de,fr,ru,es,ja,zh,ar"]):::literal
c7(["bd:serviceParam"]):::iri
bind0[/VALUES ?instances_of/]
bind0-->v1
bind00(["wd:Q12323"])
bind00 --> bind0
v2 --"p:P31"--> a1
a1 --"p:statement/P31"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P17".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P131".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P625".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end