-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathps1script
170 lines (151 loc) · 4.84 KB
/
ps1script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
.header on
.mode csv
.output try.csv
.separator ;
-- Provincienaam1;CSB;;;;;;;;;;;;;Kiesgerechtigden;16315
select domain as Regio,
code as RegioCode,
oudercode as OuderRegioCode,
'' as GrootOuderRegioCode,
'' as Partij,
'' as LijstNummer,
'' as LijstNaam,
'' as KandidaatNummer,
'' as KandidaatInitialen,
'' as KandidaatVoornaam,
'' as KandidaatTussenvoegsel,
'' as KandidaatAchternaam,
'' as KandidaatWoonplaats,
'' as KandidaatGeslacht,
'Kiesgerechtigden' as VeldType,
sum(value) as Waarde,
'' as Kolom1 from rumeta,election where formid='510d' and kind='totalballots';
.header off
-- Provincienaam1;CSB;;;;;;;;;;;;;AantalGeldigeStemmen;10232
select domain as Regio,
code as RegioCode,
oudercode as OuderRegioCode,
'' as GrootOuderRegioCode,
'' as Partij,
'' as LijstNummer,
'' as LijstNaam,
'' as KandidaatNummer,
'' as KandidaatInitialen,
'' as KandidaatVoornaam,
'' as KandidaatTussenvoegsel,
'' as KandidaatAchternaam,
'' as KandidaatWoonplaats,
'' as KandidaatGeslacht,
'AantalGeldigeStemmen' as VeldType,
sum(value) as Waarde,
'' as Kolom1 from rumeta,election where formid='510d' and kind='totalcounted';
-- Provincienaam1;CSB;;;;;;;;;;;;;AantalOngeldigeStemmen;174
select domain as Regio,
code as RegioCode,
oudercode as OuderRegioCode,
'' as GrootOuderRegioCode,
'' as Partij,
'' as LijstNummer,
'' as LijstNaam,
'' as KandidaatNummer,
'' as KandidaatInitialen,
'' as KandidaatVoornaam,
'' as KandidaatTussenvoegsel,
'' as KandidaatAchternaam,
'' as KandidaatWoonplaats,
'' as KandidaatGeslacht,
'AantalOngeldigeStemmen' as VeldType,
sum(value) as Waarde,
'' as Kolom1 from rumeta,election where formid='510d' and kind='ongeldig';
-- Provincienaam1;CSB;;;;;;;;;;;;;AantalBlancoStemmen;118
select domain as Regio,
code as RegioCode,
oudercode as OuderRegioCode,
'' as GrootOuderRegioCode,
'' as Partij,
'' as LijstNummer,
'' as LijstNaam,
'' as KandidaatNummer,
'' as KandidaatInitialen,
'' as KandidaatVoornaam,
'' as KandidaatTussenvoegsel,
'' as KandidaatAchternaam,
'' as KandidaatWoonplaats,
'' as KandidaatGeslacht,
'AantalOngeldigeStemmen' as VeldType,
sum(value) as Waarde,
'' as Kolom1 from rumeta,election where formid='510d' and kind='blanco';
-- Provincienaam1;CSB;;;;1;PARTIJNAAM1;;;;;;;;LijstAantalStemmen;2034
select domain as Regio,
code as RegioCode,
oudercode as OuderRegioCode,
'' as GrootOuderRegioCode,
'' as Partij,
affid as LijstNummer,
uniaffili.name as LijstNaam,
'' as KandidaatNummer,
'' as KandidaatInitialen,
'' as KandidaatVoornaam,
'' as KandidaatTussenvoegsel,
'' as KandidaatAchternaam,
'' as KandidaatWoonplaats,
'' as KandidaatGeslacht,
'LijstAantalStemmen' as VeldType,
sum(votes) as Waarde,
'' as Kolom1 from candvotecounts,uniaffili,election where
uniaffili.id = candvotecounts.affid and
formid='510d'
group by affid;
-- Provincienaam1;CSB;;;;1;PARTIJNAAM1;;;;;;;;LijstAantalZetels;2 <-- uit Resultaat EML
select domain as Regio,
code as RegioCode,
oudercode as OuderRegioCode,
'' as GrootOuderRegioCode,
'' as Partij,
candresults.affid as LijstNummer,
uniaffili.name as LijstNaam,
'' as KandidaatNummer,
'' as KandidaatInitialen,
'' as KandidaatVoornaam,
'' as KandidaatTussenvoegsel,
'' as KandidaatAchternaam,
'' as KandidaatWoonplaats,
'' as KandidaatGeslacht,
'LijstAantalZetels' as VeldType,
count(1) as Waarde,
'' as Kolom1 from candresults,uniaffili,election where elected=1 and uniaffili.id = candresults.affid group by candresults.affid;
--
select domain as Regio,
code as RegioCode,
oudercode as OuderRegioCode,
'' as GrootOuderRegioCode,
'' as Partij,
affid as LijstNummer,
escountsps1.name as LijstNaam,
orderno as KandidaatNummer,
initials as KandidaatInitialen,
firstname as KandidaatVoornaam,
prefix as KandidaatTussenvoegsel,
lastname as KandidaatAchternaam,
woonplaats as KandidaatWoonplaats,
gender as KandidaatGeslacht,
'KandidaatAantalStemmen' as VeldType,
svotes as Waarde,
'' as Kolom1 from escountsps1,election;
select domain as Regio,
code as RegioCode,
oudercode as OuderRegioCode,
'' as GrootOuderRegioCode,
'' as Partij,
affid as LijstNummer,
escountsps1.name as LijstNaam,
orderno as KandidaatNummer,
initials as KandidaatInitialen,
firstname as KandidaatVoornaam,
prefix as KandidaatTussenvoegsel,
lastname as KandidaatAchternaam,
woonplaats as KandidaatWoonplaats,
gender as KandidaatGeslacht,
'KandidaatGekozen' as VeldType,
1 as Waarde,
'' as Kolom1 from escountsps1,election where elected=1;