query-37fc5dc243d49ed0d2d9f59db3ae50f1
Political party membership of swiss politiciansHello everyohne. I need your help. For school i have to generate a list of swiss politicians and their political party membership(s) using SPARQL. At a first www.wikidata.org seams just fine, but my queries don't work. Here ist what I have but the result set is empty. What am I missing?
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
select ?person ?personLabel ?party ?partyLabel ?country
where {
?person p:P102 ?party ; #Parteizugehörigkeit
p:P27 wd:Q39. # Staatszugehörigkeit
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?party"):::projected
v1("?person"):::projected
c3(["wd:Q39"]):::iri
c5(["bd:serviceParam"]):::iri
c7(["en"]):::literal
v1 --"p:P102"--> v2
v1 --"p:P27"--> c3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end