|
@@ -34,10 +34,15 @@ get '/' do |
|
|
|
|
|
|
|
|
WHERE p.id = c.party_id |
|
|
WHERE p.id = c.party_id |
|
|
|
|
|
|
|
|
GROUP BY p.id |
|
|
|
|
|
|
|
|
GROUP BY p.name |
|
|
|
|
|
|
|
|
ORDER BY votes desc |
|
|
ORDER BY votes desc |
|
|
;") |
|
|
;") |
|
|
|
|
|
|
|
|
|
|
|
select p.name, count(c.*) AS seats |
|
|
|
|
|
FROM parties p, councilcandidates c |
|
|
|
|
|
GROUP BY p.id |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@total_votes = Councilcandidate.sum(:votes_2010) |
|
|
@total_votes = Councilcandidate.sum(:votes_2010) |
|
|
|
|
|
|
|
|