query-14a57d20b37e383621b16dc16ff88d07
...as a tree (UNDER DEVELOPMENT)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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#>
#defaultView:Tree
SELECT ?discipline1 (CONCAT(?dfgdiscipline1ID," ",?dfgdiscipline1Name) AS ?text1) ?discipline2 (CONCAT(?dfgdiscipline2ID," ",?dfgdiscipline2Name) AS ?text2) ?discipline3 (CONCAT(?dfgdiscipline3ID," ",?dfgdiscipline3Name) AS ?text3) ?discipline4 (CONCAT(?dfgdiscipline4ID," ",?dfgdiscipline4Name) AS ?text4)
WHERE
{
{
SELECT * WHERE {
?discipline1 p:P10287 ?statement1 .
?statement1 ps:P10287 ?dfgdiscipline1ID .
OPTIONAL {?statement1 pq:P1810 ?dfgdiscipline1Name}.
?discipline2 p:P10287 ?statement2 .
?statement2 ps:P10287 ?dfgdiscipline2ID .
OPTIONAL {?statement2 pq:P1810 ?dfgdiscipline2Name}.
?discipline3 p:P10287 ?statement3 .
?statement3 ps:P10287 ?dfgdiscipline3ID .
OPTIONAL {?statement3 pq:P1810 ?dfgdiscipline3Name}.
?discipline4 p:P10287 ?statement4 .
?statement4 ps:P10287 ?dfgdiscipline4ID .
OPTIONAL {?statement4 pq:P1810 ?dfgdiscipline4Name}.
?discipline2 wdt:P279 ?discipline1 .
?discipline3 wdt:P279 ?discipline2 .
#?discipline4 wdt:P279 ?discipline3 .
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en". }
} ORDER by ASC(?dfgdiscipline1ID) ASC(?dfgdiscipline2ID) ASC(?dfgdiscipline3ID) ASC(?dfgdiscipline4ID)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?dfgdiscipline1ID"):::projected
v7("?dfgdiscipline1Name"):::projected
v2("?dfgdiscipline2ID"):::projected
v10("?dfgdiscipline2Name"):::projected
v3("?dfgdiscipline3ID"):::projected
v13("?dfgdiscipline3Name"):::projected
v4("?dfgdiscipline4ID"):::projected
v16("?dfgdiscipline4Name"):::projected
v5("?discipline1"):::projected
v8("?discipline2"):::projected
v11("?discipline3"):::projected
v14("?discipline4"):::projected
v6("?statement1")
v9("?statement2")
v12("?statement3")
v15("?statement4")
v17("?text1")
v18("?text2")
v19("?text3")
v20("?text4")
c6(["bd:serviceParam"]):::iri
c8(["de,en"]):::literal
v5 --"p:P10287"--> v6
v6 --"p:statement/P10287"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v6 -."p:qualifier/P1810".-> v7
end
v8 --"p:P10287"--> v9
v9 --"p:statement/P10287"--> v2
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v9 -."p:qualifier/P1810".-> v10
end
v11 --"p:P10287"--> v12
v12 --"p:statement/P10287"--> v3
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v12 -."p:qualifier/P1810".-> v13
end
v14 --"p:P10287"--> v15
v15 --"p:statement/P10287"--> v4
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v15 -."p:qualifier/P1810".-> v16
end
v8 --"p:direct/P279"--> v5
v11 --"p:direct/P279"--> v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind0[/"concat(?dfgdiscipline1ID,' ',?dfgdiscipline1Name)"/]
v1 --o bind0
v7 --o bind0
bind0 --as--o v17
bind1[/"concat(?dfgdiscipline2ID,' ',?dfgdiscipline2Name)"/]
v2 --o bind1
v10 --o bind1
bind1 --as--o v18
bind2[/"concat(?dfgdiscipline3ID,' ',?dfgdiscipline3Name)"/]
v3 --o bind2
v13 --o bind2
bind2 --as--o v19
bind3[/"concat(?dfgdiscipline4ID,' ',?dfgdiscipline4Name)"/]
v4 --o bind3
v16 --o bind3
bind3 --as--o v20