query-a58a28ae798ffd7289e1d0c158ce1a1b

rq turtle/ttl

DOI in reference of taxon name (P225)

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 ?doi ?statedIn WHERE {
      ?item p:P225 ?idStatement .      
      ?item p:P225/ps:P225 ?taxonName .
      ?idStatement prov:wasDerivedFrom ?ref . 
      ?ref pr:P356 ?doi .
      OPTIONAL {?ref pr:P248 ?statedIn} .      
      FILTER(!bound(?statedIn))
      #FILTER(bound(?statedIn) && !sameTerm(?statedIn, wd:Q13711410))
}
ORDER BY ASC(?taxonName)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?doi"):::projected v4("?idStatement") v3("?item"):::projected v5("?ref") v2("?statedIn"):::projected v1("?taxonName"):::projected a1((" ")) f0[["not bound(?statedIn)"]] f0 --> v2 v3 --"p:P225"--> v4 v3 --"p:P225"--> a1 a1 --"p:statement/P225"--> v1 v4 --"prov:wasDerivedFrom"--> v5 v5 --"p:reference/P356"--> v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:reference/P248".-> v2 end