view_election (view)
Data source: ParlGov · About: simonw/parlgov-datasette
9 rows where "election_date" is on date 2011-11-26
This data as json, CSV (advanced)
Suggested facets: election_date (date)
country_name_short | country_name | election_type | election_date | vote_share | seats | seats_total | party_name_short | party_name | party_name_english | left_right | country_id | election_id | previous_parliament_election_id | previous_cabinet_id | party_id |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NZL | New Zealand | parliament | 2011-11-26 | 47.31 | 59 | 121 | NP | National Party | National Party | 6.7193 | 11 | 776 | 660 | 251 | 997 |
NZL | New Zealand | parliament | 2011-11-26 | 27.48 | 34 | 121 | LP | Labour Party | Labour Party | 4.483 | 11 | 776 | 660 | 251 | 878 |
NZL | New Zealand | parliament | 2011-11-26 | 11.06 | 14 | 121 | Greens | Green Party | Green Party | 1.7729 | 11 | 776 | 660 | 251 | 1171 |
NZL | New Zealand | parliament | 2011-11-26 | 6.59 | 8 | 121 | NZFP | New Zealand First Party | New Zealand First Party | 6.0388 | 11 | 776 | 660 | 251 | 891 |
NZL | New Zealand | parliament | 2011-11-26 | 1.43 | 3 | 121 | MP | Māori Party | Maori Party | 11 | 776 | 660 | 251 | 114 | |
NZL | New Zealand | parliament | 2011-11-26 | 1.08 | 1 | 121 | Mana | Mana Party | Mana Party | 11 | 776 | 660 | 251 | 1972 | |
NZL | New Zealand | parliament | 2011-11-26 | 1.07 | 1 | 121 | ACT | ACT New Zealand | ACT New Zealand | 9.0263 | 11 | 776 | 660 | 251 | 617 |
NZL | New Zealand | parliament | 2011-11-26 | 0.6 | 1 | 121 | UFNZ | United Future New Zealand | United Future New Zealand | 6.1219 | 11 | 776 | 660 | 251 | 1313 |
NZL | New Zealand | parliament | 2011-11-26 | 2.65 | 0 | 121 | CP | Conservative Party of New Zealand | Conservatice Party of New Zealand | 7.4 | 11 | 776 | 660 | 251 | 1973 |
Advanced export
JSON shape: default, array, newline-delimited
CREATE VIEW view_election AS SELECT c.name_short AS country_name_short, c.name AS country_name, ii.short AS election_type, e.date AS election_date, vote_share, seats, seats_total, p.name_short AS party_name_short, p.name AS party_name, p.name_english AS party_name_english, vpp.left_right AS left_right, e.country_id AS country_id, er.election_id AS election_id, e.previous_parliament_election_id AS previous_parliament_election_id, e.previous_cabinet_id AS previous_cabinet_id, er.party_id AS party_id FROM (SELECT * FROM election_result WHERE vote_share NOT NULL OR seats NOT NULL) er LEFT OUTER JOIN election e ON er.election_id = e.id LEFT OUTER JOIN party p ON er.party_id = p.id LEFT OUTER JOIN viewcalc_party_position AS vpp ON er.party_id = vpp.party_id LEFT OUTER JOIN country c ON e.country_id = c.id LEFT OUTER JOIN info_id ii ON e.type_id = ii.id ORDER BY c.name_short, e.date, er.seats DESC;