query-6d8a0733451c435c2937cd2b9436b684
. I think the top results can all be fairly called politicians, at least.(P39)position held . For a very loose interpretation of “politician”: anybody with a on Mastodon and on TwitterOriginally posted
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 ?actor ?actorLabel ?characterLabel ?count WHERE {
{
SELECT ?actor ?character (COUNT(DISTINCT ?film) AS ?count) WHERE {
?film wdt:P31/wdt:P279* wd:Q11424;
p:P161 [
ps:P161 ?actor;
pq:P453 ?character
].
FILTER(?actor != ?character)
?character wdt:P31 wd:Q5;
wdt:P39 ?position.
}
GROUP BY ?actor ?character
HAVING(?count > 1)
ORDER BY DESC(?count)
LIMIT 100
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?actor"):::projected
v3("?character")
v6("?count"):::projected
v4("?film")
v5("?position")
a1((" "))
a2((" "))
c11(["bd:serviceParam"]):::iri
c8(["wd:Q5"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c4(["wd:Q11424"]):::iri
f0[["?count > '1^^xsd:integer'"]]
f0 --> v6
f1[["?actor != ?character"]]
f1 --> v2
f1 --> v3
v4 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c4
a2 --"p:statement/P161"--> v2
a2 --"p:qualifier/P453"--> v3
v4 --"p:P161"--> a2
v3 --"p:direct/P31"--> c8
v3 --"p:direct/P39"--> v5
bind3[/"count(?film)"/]
v4 --o bind3
bind3 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end