query-d7f8dbdc24263f77a27c390f8367b469

rq turtle/ttl

Taxa with a reference to Squirrels of the World (Q19597701)

Use at

PREFIX wd: <http://www.wikidata.org/entity/>
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 ?pages WHERE {
  ?item p:P225 ?statement .
  ?statement ps:P225 ?taxonName .
  ?statement prov:wasDerivedFrom ?ref .
  ?ref pr:P248 wd:Q19597701 . # Squirrels of the World
  OPTIONAL {?ref pr:P304 ?pages}
}
ORDER BY ASC(?taxonName)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v5("?pages"):::projected v4("?ref") v3("?statement") v1("?taxonName"):::projected c5(["wd:Q19597701"]):::iri v2 --"p:P225"--> v3 v3 --"p:statement/P225"--> v1 v3 --"prov:wasDerivedFrom"--> v4 v4 --"p:reference/P248"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:reference/P304".-> v5 end