User:Akbarali/sandbox/governor2

{{{{{|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 p:P31 ?stat_inst. ?stat_inst ps:P31 wd:Q24097670. ?stat_inst pq:P1545 "2". ?item_position (wdt:P541/wdt:P279*) wd:Q25921469. 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 p:P31 ?stat_inst. ?stat_inst ps:P31 wd:Q24097670. ?stat_inst pq:P1545 "2". ?item_position (wdt:P541/wdt:P279*) wd:Q25921469. 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/Executive row
 * header_template=subst:Template:Mbabel-BSE/Executive 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) }} = }} }} {| The ruling for the post of governor and vice governor took place in the second round of. The dispute between candidates Márcio Bittar (Brazilian Social Democracy Party) and Tião Viana (Workers' Party) and their respective vices, Antonia Rojas Sales and Nazareth Araújo, was decided on 26 October 2014 with the Superior Electoral Court's calculation of 383,167 votes, excluding 2,510 blank votes and 8,480 spoilt votes. Tião Viana's ticket won with {{percentage|196,509|383,167|2}} of the valid votes. There were {{percentage|112,365|506,522|2}} of abstentions in the second 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/Executive row
 * header_template=subst:Template:Mbabel-BSE/Executive header
 * replace==
 * pattern===
 * replace====
 * pattern====
 * replace====