User:Denny/sandbox/state

{{{{{|safesubst: }}}#invoke:String|replace SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?item_position wdt:P361* wd:Q17813784. ?item_position wdt:P1697 ?valids. ?item_position wdt:P31 wd:Q40231. {?item_position (wdt:P541/wdt:P279*) wd:Q10265290.} UNION {?item_position (wdt:P541/wdt:P279*) wd:Q10265289.} OPTIONAL {?item_position p:P726 ?statement.} OPTIONAL {?item_position p:P991 ?statement.} OPTIONAL {?statement ps:P726 ?item.} OPTIONAL {?statement ps:P991 ?item.}
 * source={{{{{|safesubst: }}}#invoke:String|replace
 * source={{{{{|safesubst: }}}#invoke:String|replace
 * source={{{{{|safesubst: }}}#invoke:String|replace
 * source={{Wikidata list
 * sparql=SELECT ?item ?party ?acron ?alliance ?item_position ?votes ?valids ?result ?vice WHERE {

OPTIONAL {?statement pq:P1111 ?votes.} OPTIONAL {?statement pq:P102 ?party.} OPTIONAL {?statement pq:P5832 ?alliance.} OPTIONAL {?party wdt:P1813 ?acron.} OPTIONAL {?statement pq:P6149 ?vice.}

BIND(IF (EXISTS {?item_position wdt:P991 ?item}, "9aed9e","f8f9fa") as ?result) } ORDER BY DESC(?votes) }}{{Wikidata list end}} }} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?item_position wdt:P361* wd:Q17813784. ?item_position wdt:P1697 ?valids. ?item_position wdt:P31 wd:Q40231. {?item_position (wdt:P541/wdt:P279*) wd:Q10265290.} UNION {?item_position (wdt:P541/wdt:P279*) wd:Q10265289.} OPTIONAL {?item_position p:P726 ?statement.} OPTIONAL {?item_position p:P991 ?statement.} OPTIONAL {?statement ps:P726 ?item.} OPTIONAL {?statement ps:P991 ?item.}
 * columns=label:Candidate, ?votes:Votes received,?valids:Percentage, ?result, ?party, ?alliance, ?vice, ?acron
 * section=?item_position
 * sort=
 * min_section=1
 * thumb=128si
 * autolist=fallback
 * wdedit=yes
 * links=red
 * row_template=subst:Template:Mbabel-BSE/Legislative row
 * header_template=subst:Template:Mbabel-BSE/Legislative header
 * pattern={{((}}Wikidata list end{{))}}
 * replace=
 * pattern={{Wikidata list
 * sparql=SELECT ?item ?party ?acron ?alliance ?item_position ?votes ?valids ?result ?vice WHERE {

OPTIONAL {?statement pq:P1111 ?votes.} OPTIONAL {?statement pq:P102 ?party.} OPTIONAL {?statement pq:P5832 ?alliance.} OPTIONAL {?party wdt:P1813 ?acron.} OPTIONAL {?statement pq:P6149 ?vice.}

BIND(IF (EXISTS {?item_position wdt:P991 ?item}, "9aed9e","f8f9fa") as ?result) } ORDER BY DESC(?votes) }} = }} }} {| In the decision for the position of state deputy in the state elections of 2014, 24 deputies were elected with a total of 405,514 valid votes. The Superior Electoral Court counted 6,402 blank votes and 6,856 spoilt votes. Of a total of 506,520 eligible voters, 87,748 ({{percentage|87,748|506,520|2}}) did not attend the ballot in the first round.
 * columns=label:Candidate, ?votes:Votes received,?valids:Percentage, ?result, ?party, ?alliance, ?vice, ?acron
 * section=?item_position
 * sort=
 * min_section=1
 * thumb=128si
 * autolist=fallback
 * wdedit=yes
 * links=red
 * row_template=subst:Template:Mbabel-BSE/Legislative row
 * header_template=subst:Template:Mbabel-BSE/Legislative header
 * replace==
 * pattern===
 * replace====
 * pattern====
 * replace====