query-8b4a15ca9ebdd59e3da3100983a1e0ad
TODO
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 ?level0 ?level0Label ?level1 ?level1Label ?level2 ?level2Label ?level3 ?level3Label ?level4 ?level4Label
WHERE
{
BIND(wd:Q3604202 as ?level0)
?level1 wdt:P279 ?level0.
OPTIONAL {?level2 wdt:P279 ?level1.
OPTIONAL {?level3 wdt:P279 ?level2.
OPTIONAL {?level4 wdt:P279 ?level3.} } }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by ?level1Label ?level2Label ?level3Label ?level4Label
Query found at
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/11
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/en
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/es
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/fr
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?level0"):::projected
v6("?level1"):::projected
v1("?level1Label"):::projected
v7("?level2"):::projected
v2("?level2Label"):::projected
v8("?level3"):::projected
v3("?level3Label"):::projected
v9("?level4"):::projected
v4("?level4Label"):::projected
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/"'wd:Q3604202'"/]
bind0 --as--o v5
v6 --"wdt:P279"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v7 -."wdt:P279".-> v6
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v8 -."wdt:P279".-> v7
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v9 -."wdt:P279".-> v8
end
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end