query-77c17d9663aba4839a75d6e55d7fe572
MPs elected from their native district is excluded due to the particularity of the electoral map there (Q472)Sofia from which they are elected. (Q43791141)constituency of the National Assembly of Bulgaria in the (P19)place of birth This query selects only MPs from the 48th national assembly, which are born (
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
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 * {
?ns p:P31 [ps:P31 wd:Q43792361 ; pq:P1545 "48"] .
?mp p:P39 [ps:P39 wd:Q18924508 ; pq:P2937 ?ns ; pq:P768 ?mir] ; wdt:P19 ?pob.
?pob wdt:P131*/wdt:P7938 ?mir .
SERVICE wikibase:label { bd:serviceParam wikibase:language "bg".
?mp rdfs:label ?mpLabel .
?ns rdfs:label ?nsLabel .
?mir rdfs:label ?mirLabel .
?pob rdfs:label ?pobLabel .
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?mir"):::projected
v7("?mirLabel"):::projected
v3("?mp"):::projected
v5("?mpLabel"):::projected
v1("?ns"):::projected
v6("?nsLabel"):::projected
v4("?pob"):::projected
v8("?pobLabel"):::projected
a1((" "))
a2((" "))
a3((" "))
c4(["48"]):::literal
c7(["wd:Q18924508"]):::iri
c17(["bg"]):::literal
c2(["wd:Q43792361"]):::iri
c15(["bd:serviceParam"]):::iri
a1 --"p:statement/P31"--> c2
a1 --"p:qualifier/P1545"--> c4
v1 --"p:P31"--> a1
a2 --"p:statement/P39"--> c7
a2 --"p:qualifier/P2937"--> v1
a2 --"p:qualifier/P768"--> v2
v3 --"p:P39"--> a2
v3 --"p:direct/P19"--> v4
v4 --"p:direct/P131"--> a3
a3 --"p:direct/P7938"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
v3 --"rdfs:label"--> v5
v1 --"rdfs:label"--> v6
v2 --"rdfs:label"--> v7
v4 --"rdfs:label"--> v8
end