query-15c2f0ca3aa73543882bcf1cd3841c9b
Composition by group of National Assembly of Bulgaria (Q639704)
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
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#>
#defaultView:BarChart
select ?nsLabel (COUNT(distinct ?x) as ?mps) ?groupLabel {
?ns p:P31 [ps:P31 wd:Q43792361 ; pq:P1545 ?num]
bind(strdt(?num,xsd:integer) as ?NUM)
filter(?NUM >= 39)
?x p:P39 [ps:P39 wd:Q18924508 ; pq:P2937 ?ns ; pq:P4100 ?group] .
SERVICE wikibase:label { bd:serviceParam wikibase:language "bg".
?ns rdfs:label ?nsLabel .
?group rdfs:label ?groupLabel .
}
} group by ?nsLabel ?groupLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?NUM")
v4("?group")
v7("?groupLabel"):::projected
v8("?mps")
v3("?ns")
v6("?nsLabel"):::projected
v2("?num")
v5("?x"):::projected
a1((" "))
a2((" "))
c7(["wd:Q18924508"]):::iri
c14(["bg"]):::literal
c3(["wd:Q43792361"]):::iri
c12(["bd:serviceParam"]):::iri
f0[["?NUM >= '39^^xsd:integer'"]]
f0 --> v4
a1 --"p:statement/P31"--> c3
a1 --"p:qualifier/P1545"--> v2
v3 --"p:P31"--> a1
bind1[/"STRDT(?num,'xsd:integer')"/]
v2 --o bind1
bind1 --as--o v4
a2 --"p:statement/P39"--> c7
a2 --"p:qualifier/P2937"--> v3
a2 --"p:qualifier/P4100"--> v4
v5 --"p:P39"--> a2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
v3 --"rdfs:label"--> v6
v4 --"rdfs:label"--> v7
end
bind3[/"count(?x)"/]
v5 --o bind3
bind3 --as--o v8