query-c9a6b02d2f11bc191e199bfc619a659d
executive body (P208): "government" or "cabinet"?. (Q640506)cabinet (with individual Cabinets being instances of that), rather than a direct instance of (Q640506)cabinet of subclass), as the item is usually a Wikidata:Database_reports/Constraint_violations/P208#Value_type_Q35798 (as well as most other countries where the Cabinet, rather than the Government is set as the value) fails this check ((Q2578249)cabinet of Israel , and (Q35798)executive branch . However, it also has an "Allowed values" constraint of (Q2578249)cabinet of Israel → (Q801)Israel ) gives as its example Property_talk:P208 ((P208)executive body The documentation for . (Q48525)Federal Government of the United States is a part of (Q639738)United States Cabinet is a part, and (Q112014)Cabinet of the United Kingdom of which (Q6063)Government of the United Kingdom From what I can see, many of these countries don't have a separate item for the national government, distinct from the Cabinet, but some countries do: e.g. the UK has set yet at all, and of those that do, there's a slight preference for the "cabinet" rather than the "government", but the numbers are small enough for it to be inconclusive: (P208)executive body Surveying how this is used generally isn't a lot of help — most countries don't have
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 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#>
SELECT DISTINCT ?country ?countryLabel ?body ?bodyLabel ?parentLabel
WHERE {
?country wdt:P31 wd:Q6256 . # find instances of country
OPTIONAL {
?country p:P208 ?statement . # with a P208 (government) statement
?statement ps:P208 ?body . # which we assign as ?body
FILTER NOT EXISTS { ?statement pq:P582 ?end_date } # with no P582 (end date) qualifier
OPTIONAL { ?body wdt:P279 ?parent } # and set ?parent based on either subclass
OPTIONAL { ?body wdt:P31 ?parent } # or instance of
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
ORDER BY ?countryLabel