query-ec992c6b02c34b2e1900f4912a27e211
Query #4: List WWF Ecoregions that have are marked as such with P31Query to list WWF Ecoregions
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?x ?y ?xLabel ?map ?pic ?wplink
WHERE {
?x wdt:P31 wd:Q6617741 .
?x wdt:P17 wd:Q148 .
# OPTIONAL { ?x wdt:P1294 ?y }.
?x wdt:P1294 ?y .
# MINUS { ?x wdt:P1294 ?y }.
# FILTER ( regex(?y, "AT", "i")) .
OPTIONAL {?x wdt:P18 ?pic} .
OPTIONAL {?x wdt:P242 ?map} .
OPTIONAL {
?wplink schema:about ?x . # WP link - is about - ?ecoreg
?wplink schema:inLanguage "en" .
?wplink schema:isPartOf <https://en.wikipedia.org/> .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ASC(?xLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?map"):::projected
v4("?pic"):::projected
v6("?wplink"):::projected
v2("?x"):::projected
v1("?xLabel"):::projected
v3("?y"):::projected
c10(["en"]):::literal
c4(["wd:Q148"]):::iri
c12([https://en.wikipedia.org/]):::iri
c14(["bd:serviceParam"]):::iri
c2(["wd:Q6617741"]):::iri
v2 --"wdt:P31"--> c2
v2 --"wdt:P17"--> c4
v2 --"wdt:P1294"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P242".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v6 -."schema:about".-> v2
v6 --"schema:inLanguage"--> c10
v6 --"schema:isPartOf"--> c12
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c10
end