query-27742acc8d3bc51c6d4674ed84ab0415
all taxa with the same author
by Jura1, Aug 29, 2020
SELECT (YEAR(?date) as ?year) ?taxonitem ?taxonitemLabel ?taxonitemDescription ?rank ?rankLabel ?img ?wikispecies WHERE { ?st pq:P405 wd:Q2418660 . ?st ps:P225 ?taxon . ?taxonitem p:P225 ?st . OPTIONAL { ?st pq:P574 ?date } OPTIONAL { ?taxonitem wdt:P105 ?rank } OPTIONAL { ?taxonitem wdt:P18 ?img } OPTIONAL { ?wikispecies schema:about ?taxonitem ; schema:isPartOf https://species.wikimedia.org/ } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Use at
- https://query.wikidata.org/sparql
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 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#>
#all taxa with the same author
#by Jura1, Aug 29, 2020
SELECT (YEAR(?date) as ?year) ?taxonitem ?taxonitemLabel ?taxonitemDescription ?rank ?rankLabel ?img ?wikispecies
WHERE
{
?st pq:P405 wd:Q2418660 .
?st ps:P225 ?taxon .
?taxonitem p:P225 ?st .
OPTIONAL { ?st pq:P574 ?date }
OPTIONAL { ?taxonitem wdt:P105 ?rank }
OPTIONAL { ?taxonitem wdt:P18 ?img }
OPTIONAL { ?wikispecies schema:about ?taxonitem ; schema:isPartOf <https://species.wikimedia.org/> }
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;
v4("?date"):::projected
v6("?img"):::projected
v5("?rank"):::projected
v1("?st")
v2("?taxon")
v3("?taxonitem"):::projected
v7("?wikispecies"):::projected
v8("?year")
c2(["wd:Q2418660"]):::iri
c10([https://species.wikimedia.org/]):::iri
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:qualifier/P405"--> c2
v1 --"p:statement/P225"--> v2
v3 --"p:P225"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:qualifier/P574".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P105".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P18".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v7 -."schema:about".-> v3
v7 --"schema:isPartOf"--> c10
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end
bind0[/"year-from-dateTime(?date)"/]
v4 --o bind0
bind0 --as--o v8