query-4ce63e79013404745f95d0514a0d4a44
Possibly wrong Id
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?taxonName ?iucnId ?iucnIdInRef WHERE {
?item wdt:P627 ?iucnId .
?item wdt:P225 ?taxonName .
?item p:P141 ?iucnStatus .
?iucnStatus ps:P141 ?iucnStatusValue .
?iucnStatus prov:wasDerivedFrom ?ref .
OPTIONAL {?ref pr:P627 ?iucnIdInRef} .
FILTER (?iucnId != ?iucnIdInRef)
}
ORDER BY ASC(xsd:integer(?iucnId))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v1("?iucnId"):::projected
v2("?iucnIdInRef"):::projected
v5("?iucnStatus")
v6("?iucnStatusValue")
v7("?ref")
v4("?taxonName"):::projected
f0[["?iucnId != ?iucnIdInRef"]]
f0 --> v1
f0 --> v2
v3 --"p:direct/P627"--> v1
v3 --"p:direct/P225"--> v4
v3 --"p:P141"--> v5
v5 --"p:statement/P141"--> v6
v5 --"prov:wasDerivedFrom"--> v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v7 -."p:reference/P627".-> v2
end