query-c3f477c3e7e397747a0ace41fb04beec
Ainali
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 bd: <http://www.bigdata.com/rdf#>
#defaultView:Graph
SELECT DISTINCT ?item ?itemLabel ?has_cause ?has_causeLabel ?edgeLabel
WHERE
{
wd:Q362 (wdt:P828 | wdt:P1478 | wdt:P1479) * ?item .
{
?item wdt:P828 ?has_cause .
BIND ("has cause" AS ?edgeLabel)
}
UNION
{
?item wdt:P1478 ?has_cause .
BIND ("has immediate cause" AS ?edgeLabel)
}
UNION
{
?item wdt:P1479 ?has_cause .
BIND ("has contributing factor" AS ?edgeLabel)
}
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("?edgeLabel"):::projected
v2("?has_cause"):::projected
v1("?item"):::projected
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c1(["wd:Q362"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P1479"--> v1
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P1478"--> v1
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P828"--> v1
end
union0r <== or ==> union0l
end
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P1479"--> v2
bind0[/"'has contributing factor'"/]
bind0 --as--o v4
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P1478"--> v2
bind1[/"'has immediate cause'"/]
bind1 --as--o v4
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P828"--> v2
bind2[/"'has cause'"/]
bind2 --as--o v4
end
union2r <== or ==> union2l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end