query-2fd4cfc9684c3ad4edd5ae06ea49aad8
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX schema: <http://schema.org/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item (group_concat(?BRid;separator=" / ") as ?BRid) (group_concat(?IHc;separator=" / ") as ?IHcid) ?specieslink WHERE {
{?item p:P4090 [ ps:P4090 ?BRid ] .}
union
{?item p:P5858 [ ps:P5858 ?IHc ] .}
?specieslink schema:about ?item; schema:isPartOf <https://species.wikimedia.org/> .
} group by ?item ?specieslink
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?BRid"):::projected
v3("?IHc"):::projected
v5("?IHcid")
v2("?item"):::projected
v4("?specieslink"):::projected
a1((" "))
a2((" "))
c7([https://species.wikimedia.org/]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
a2 --"p:statement/P5858"--> v3
v2 --"p:P5858"--> a2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
a1 --"p:statement/P4090"--> v5
v2 --"p:P4090"--> a1
end
union0r <== or ==> union0l
end
v4 --"schema:about"--> v2
v4 --"schema:isPartOf"--> c7
bind2[/"?BRid"/]
v5 --o bind2
bind2 --as--o v5
bind3[/"?IHc"/]
v3 --o bind3
bind3 --as--o v5