Skip to content

Instantly share code, notes, and snippets.

@wrboyce
Last active June 9, 2017 16:14
Show Gist options
  • Save wrboyce/5e1dbbd7377ca21319de1936207a7566 to your computer and use it in GitHub Desktop.
Save wrboyce/5e1dbbd7377ca21319de1936207a7566 to your computer and use it in GitHub Desktop.

72 Parties!

sqlite> select * from parties;
id          name
----------  ----------
1           Lab
2           Con
3           PC
4           UKIP
5           Lib Dem
6           SNP
7           Ind
8           Green
9           Loony
10          Lib
11          DUP
12          Alliance
13          UUP
14          SF
15          SDLP
16          TUV
17          Eng Dem
18          Yorkshire
19          Lab Co-op
20          BNP
21          Libertaria
22          SPGB
23          CPA
24          WP
25          PBP
26          Good
27          Soc Lab
28          Open
29          Space
30          Blue
31          Pirate
32          Bradford
33          ND
34          Money
35          Speaker
36          WRP
37          Rebooting
38          Patria
39          Young
40          Concordia
41          Humanity
42          Wessex Reg
43          NHAP
44          NE Party
45          Friends
46          Referendum
47          Sovereign
48          Soc Dem
49          Peace
50          AWP
51          JACP
52          Radical
53          Women
54          S New
55          SCP
56          Comm Lge
57          WVPTFP
58          Green Soc
59          Realist
60          Populist
61          Just
62          AD
63          North
64          Elvis
65          DDI
66          Worth
67          Active Dem
68          GM Homeles
69          Southampto
70          Southend
71          Citizens
72          Compass

Candidates who took less than 100 votes!

sqlite> select p.name as party, c.name, c.votes from candidates c join parties p on p.id = c.party_id where votes < 100 order by votes asc;
party       name         votes
----------  -----------  ----------
ND          Bobby Smith  3
Comm Lge    Andres Mend  7
Ind         Yemi Hailem  16
SPGB        Bill Martin  21
Comm Lge    Peter Cliff  27
Ind         Dale Kalama  29
Worth       Rodney Mail  31
SPGB        Daniel Lamb  32
Ind         Gavan Reyno  37
Soc Dem     Joe Westrid  38
Compass     Mark Shuker  38
Ind         Susanne Cam  41
Young       Benjamin We  43
Ind         Jagdeosingh  44
Young       Jon Colling  45
Green Soc   Mike Davies  47
Soc Dem     Muzafar Rah  47
Ind         Hugo Sugg    50
Populist    Russell Whi  50
Ind         David Hopki  51
Just        Julian Reid  52
Ind         Bobby Beck   54
Ind         Muhammad Hi  54
WRP         Anna Athow   55
ND          Semi Essess  57
Ind         Mohammed Ha  58
Ind         Lotta Quize  58
Ind         Ankit Love   59
Friends     Coraline Co  59
Ind         Rainbow Geo  61
Realist     Jane Lawren  61
Soc Dem     Jaspreet Ob  64
ND          Hussain Kha  65
Friends     Kane Khan    65
ND          Jonathan Bi  67
Libertaria  Will Taylor  67
CPA         Tim Mutamir  67
CPA         Edmonds Vic  69
Soc Dem     Steven Wins  70
Ind         Don Locke    71
Ind         Marteen Tho  75
Ind         Doro Oddiri  80
Space       Lisabela Ma  81
Ind         Afzal Mahmo  81
Ind         Gordon John  82
CPA         Chinwe Nwad  83
Patria      Andrew Emer  84
Concordia   Terence Lon  85
WRP         Jonty Leff   86
Pirate      Robert Mora  91
ND          Abby Dharam  91
SPGB        Brian Johns  92
Eng Dem     Janus Polen  93
CPA         Helen Spiby  93
Open        Harjinder S  99
Ind         Sally Woodh  99

Top 10 candidates by total votes cast

sqlite> select p.name as party, c.name, c.votes from candidates c join parties p on p.id = c.party_id order by votes desc limit 10;
party       name            votes
----------  --------------  ----------
Lab         George Howarth  47351
Lab         Thangam Debbon  47213
Lab         Stephen Timms   47124
Lab         Lyn Brown       46591
Lab         Harriet Harman  44665
Lab Co-op   Steve Reed      44213
Lab Co-op   Meg Hillier     43974
Lab Co-op   Mike Gapes      43724
Lab         Rushanara Ali   42969
Lab         Vicky Foxcroft  42461
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment