query-cea39681b4793254ec878265a4b1cf05
Query for active ministries of the Republic of KazakhstanThe query searches for instances of / subclasses of ministry, which apply to the jurisdiction of Kazakhstan. The search is then filtered to only include active ministries, that have not been dissolved. The query should give 21 + 1 result (21 ministries + the prime ministers office).
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 DISTINCT ?ministry ?ministryLabel WHERE {
?ministry wdt:P31/wdt:P279* wd:Q192350;
wdt:P1001 wd:Q232.
FILTER NOT EXISTS { ?ministry wdt:P576 ?dissolutionDate }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?ministryLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?dissolutionDate")
v2("?ministry"):::projected
v1("?ministryLabel"):::projected
a1((" "))
c8(["bd:serviceParam"]):::iri
c4(["wd:Q192350"]):::iri
c10(["en"]):::literal
c6(["wd:Q232"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P576"--> e0v2
e0v2("?dissolutionDate"):::projected
e0v1("?ministry"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
v2 --"wdt:P576"--> v3
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
v2 --"wdt:P1001"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end