query-488ccc6c7015a920d526660028f7a7ef
Federal Authorities The query returns federal authorities which are linked to the Federal Council through one or several parental relationships.
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#>
SELECT ?item ?itemLabel ?parentLabel ?grandparentLabel WHERE {
?item wdt:P749* wd:Q30917.
OPTIONAL { ?item wdt:P749 ?parent. }
OPTIONAL { ?item wdt:P749/wdt:P749 ?grandparent. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "de, fr, it, en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?grandparent")
v1("?item"):::projected
v2("?parent")
a1((" "))
c4(["bd:serviceParam"]):::iri
c6(["de, fr, it, en"]):::literal
c2(["wd:Q30917"]):::iri
v1 --"wdt:P749"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P749".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P749".-> a1
a1 --"wdt:P749"--> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end