query-f4dd3083bd2666aef224ca8d6fb2bfbc

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?taxon_name ?taxon_author  ?taxon_authorLabel 
WHERE 
{
  ?item wdt:P171 wd:Q1757472   .             # whatever the particular parent taxon value is
  ?item p:P225 ?stat .                      # there is a P225
  ?stat ps:P225 ?taxon_name .               # it has a taxon name         
  OPTIONAL {?stat pq:P405 ?taxon_author .}  # P225 might have P405 author name as a PQ
  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; v1("?item"):::projected v2("?stat") v4("?taxon_author"):::projected v3("?taxon_name"):::projected c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q1757472"]):::iri v1 --"p:direct/P171"--> c2 v1 --"p:P225"--> v2 v2 --"p:statement/P225"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P405".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end