query-9c2aea7793331e55d4a8aee1673abd50
Propertiessubclass of (P279)
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:Tree
SELECT ?top ?topLabel ?grandparent ?grandparentLabel ?parent ?parentLabel ?child ?childLabel ?grandchild ?grandchildLabel ?property ?propertyLabel
WHERE
{
VALUES ?top { wd:Q2431196 wd:Q2188189 }
{
?class wdt:P279 ?top.
} UNION {
?grandparent wdt:P279 ?top.
?class wdt:P279 ?grandparent.
} UNION {
?grandparent wdt:P279 ?top.
?parent wdt:P279 ?grandparent.
?class wdt:P279 ?parent.
} UNION {
?grandparent wdt:P279 ?top.
?parent wdt:P279 ?grandparent.
?child wdt:P279 ?parent.
?class wdt:P279 ?child.
} UNION {
?grandparent wdt:P279 ?top.
?parent wdt:P279 ?grandparent.
?child wdt:P279 ?parent.
?grandchild wdt:P279 ?child.
?class wdt:P279 ?grandchild.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?child"):::projected
v2("?class")
v6("?grandchild"):::projected
v3("?grandparent"):::projected
v4("?parent"):::projected
v1("?top"):::projected
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en,fr"]):::literal
bind0[/VALUES ?top/]
bind0-->v1
bind00(["wd:Q2431196"])
bind00 --> bind0
bind01(["wd:Q2188189"])
bind01 --> bind0
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;
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;
v3 --"wdt:P279"--> v1
v4 --"wdt:P279"--> v3
v5 --"wdt:P279"--> v4
v6 --"wdt:P279"--> v5
v2 --"wdt:P279"--> v6
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P279"--> v1
v4 --"wdt:P279"--> v3
v5 --"wdt:P279"--> v4
v2 --"wdt:P279"--> v5
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P279"--> v1
v4 --"wdt:P279"--> v3
v2 --"wdt:P279"--> v4
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P279"--> v1
v2 --"wdt:P279"--> v3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P279"--> v1
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end