query-f071af70c1699a3aaa38680e65286848

rq turtle/ttl

Endangered taxa with representation on Wikimedia but no English Wikipedia article SELECT ?item ?itemLabel ?links (URI(CONCAT("https://www.iucnredlist.org/details/",?iucn_id,"/0")) AS ?iucn_link) WHERE { ?item wdt:P141 wd:Q11394 . # IUCN status: Endangered ?item wikibase:sitelinks ?links FILTER (?links > 1) # More than 1 page on Wikimedia MINUS{?enwp schema:about ?item; schema:isPartOf https://en.wikipedia.org/ } # Not in English Wikipedia OPTIONAL{?item wdt:P627 ?iucn_id} # Get IUCN link if available SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

Use at

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#>
#Endangered taxa with representation on Wikimedia but no English Wikipedia article
SELECT ?item ?itemLabel ?links (URI(CONCAT("https://www.iucnredlist.org/details/",?iucn_id,"/0")) AS ?iucn_link) WHERE {
  ?item wdt:P141 wd:Q11394 . # IUCN status: Endangered
  ?item wikibase:sitelinks ?links FILTER (?links > 1)  # More than 1 page on Wikimedia
  MINUS{?enwp schema:about ?item; schema:isPartOf <https://en.wikipedia.org/> } # Not in English Wikipedia
  OPTIONAL{?item wdt:P627 ?iucn_id} # Get IUCN link if available
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?enwp") v2("?item"):::projected v4("?iucn_id"):::projected v5("?iucn_link") v1("?links"):::projected c7([https://en.wikipedia.org/]):::iri c10(["bd:serviceParam"]):::iri c3(["wd:Q11394"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?links > '1^^xsd:integer'"]] f0 --> v1 v2 --"wdt:P141"--> c3 v2 --"wikibase:sitelinks"--> v1 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v3 --"schema:about"--> v2 v3 --"schema:isPartOf"--> c7 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P627".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end bind2[/"concat('https://www.iucnredlist.org/details/',?iucn_id,'/0')"/] v4 --o bind2 bind2 --as--o v5