User:Akbarali/sandbox/governor1

{{{{{|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 "1". ?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 "1". ?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 election for governor counted on 4 candidates in 2014: Tião Viana (Workers' Party), Márcio Bittar (Brazilian Social Democracy Party), Tião Bocalom (Democrats), Antônio Rocha (Socialism and Liberty Party), who obtained, respectively, 193,253, 116,948, 76,218, 2,171 votes in the first round. The Superior Electoral Court also counted {{percentage|87,748|506,520|2}} of abstentions this round. Since no candidate received more than half of the valid votes, there was a second round between Tião Viana and Márcio Bittar on 5 October 2014.
 * 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====