query-4359f0b5052776093286c37d80071cab
Propertiesinstance of (P31)subclass of (P279)country (P17)located in the administrative territorial entity (P131)located in or next to body of water (P206)
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?itemDescription ?istEinLabel ?liegtInVerwLabel ?liegtInGewLabel
WHERE
{
?item wdt:P31/wdt:P279? wd:Q105731.
?item wdt:P17 wd:Q183.
?item wdt:P31 ?istEin
OPTIONAL { ?item wdt:P131 ?liegtInVerw }
OPTIONAL { ?item wdt:P206 ?liegtInGew }
FILTER ( ! (BOUND(?liegtInGew ) && BOUND(?liegtInVerw )) ) # nur wenn kein liegt in oder P131 angegeben
SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
} ORDER BY ?liegtInGew
LIMIT 300
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?istEin")
v3("?item"):::projected
v1("?liegtInGew")
v2("?liegtInVerw")
a1((" "))
c11(["de"]):::literal
c9(["bd:serviceParam"]):::iri
c2(["wd:Q105731"]):::iri
c5(["wd:Q183"]):::iri
f0[["not bound(?liegtInGew)bound(?liegtInVerw)"]]
f0 --> v1
f0 --> v2
v3 --"wdt:P31"--> a1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P279"--> c2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
end
union0r <== or ==> union0l
end
v3 --"wdt:P17"--> c5
v3 --"wdt:P31"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P131".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P206".-> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end