query-856d0b2372e5fd0081146a246496dd6d
Then tick "Use wiki: Wikidata", and set the Combination to "categories NOT sparql". After running this, and sanity-checking that the results are all indeed Georgian MPs, the command "P39:Q21290878" can then be set on all of them. I did this for the Category on ru, de, en, ka, and pl. (ka also has people in separate categories for member of the 7th, 8th, 9th term, etc. I'm not sure we're quite ready to set term-specific P39s there yet, but when we are, this will be useful.) , so I also used Petscan to add those too. (Q82955)politician : (P106)occupation , or (Q5)human : (P31)instance of Quite a few members weren't marked as There are many with no English label:
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?item WHERE {
?item wdt:P39 wd:Q21290878 .
FILTER NOT EXISTS {
?item rdfs:label ?lang_label .
FILTER(LANG(?lang_label) ="en")
}
}
Query found at
- https://www.wikidata.org/wiki/User:Oravrattas/daynotes
- https://www.wikidata.org/wiki/User:Oravrattas/daynotes/2017-07-14
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?lang_label")
c4(["wd:Q21290878"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?lang_label = 'en'"]]
e0f0 --> e0v1
e0v2 --"rdfs:label"--> e0v1
e0v2("?item"):::projected
e0v1("?lang_label"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> v2
f0 --> c2
f1[["?lang_label = 'en'"]]
f1 --> v1
v2 --"rdfs:label"--> v1
v2 --"wdt:P39"--> c4