Skip to content

Commit 0f55f65

Browse files
author
WolfBunke
authored
update version selection
* select all versions for SQ * select v0.4.4 and v0.4.5 version for NEP2035 and eGo100
1 parent ceece77 commit 0f55f65

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

dataprocessing/sql_snippets/ego_dp_versioning_mviews.sql

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CREATE MATERIALIZED VIEW supply.ego_dp_conv_powerplant_sq_mview AS
1919
AND (shutdown IS NULL or shutdown >= 2015)
2020
AND capacity > 0
2121
AND preversion = 'v0.3.0';
22-
--AND version in ('v0.4.2','v0.4.4','v0.4.5');
22+
--AND version in ('v0.4.4','v0.4.5');
2323

2424

2525
ALTER MATERIALIZED VIEW supply.ego_dp_conv_powerplant_sq_mview
@@ -36,7 +36,7 @@ CREATE MATERIALIZED VIEW supply.ego_dp_conv_powerplant_nep2035_mview AS
3636

3737
AND (shutdown IS NULL or shutdown >= 2034)
3838
AND preversion = 'v0.3.0';
39-
--AND version in ('v0.4.2','v0.4.4','v0.4.5');
39+
AND version in ('v0.4.4','v0.4.5');
4040

4141

4242
ALTER MATERIALIZED VIEW supply.ego_dp_conv_powerplant_nep2035_mview
@@ -94,7 +94,7 @@ CREATE MATERIALIZED VIEW supply.ego_dp_conv_powerplant_ego100_mview AS
9494
AND capacity > 0
9595
AND (shutdown IS NULL or shutdown >= 2049)
9696
AND preversion = 'v0.3.0';
97-
--AND version in ('v0.4.2','v0.4.4','v0.4.5');
97+
AND version in ('v0.4.4','v0.4.5');
9898

9999
ALTER MATERIALIZED VIEW supply.ego_dp_conv_powerplant_ego100_mview
100100
OWNER TO oeuser;
@@ -133,13 +133,13 @@ CREATE MATERIALIZED VIEW supply.ego_dp_res_powerplant_nep2035_mview AS
133133
WHERE id||version not in (
134134
SELECT id||version
135135
FROM supply.ego_dp_res_powerplant
136-
WHERE version in ('v0.4.2','v0.4.4','v0.4.5')
136+
WHERE version in ('v0.4.4','v0.4.5')
137137
Group BY id||version
138138
HAVING count(*) > 1
139139
Order by id||version)
140140
AND scenario = 'Status Quo'
141141
And preversion = 'v0.3.0'
142-
AND version in ('v0.4.2','v0.4.4','v0.4.5')
142+
AND version in ('v0.4.4','v0.4.5')
143143
AND electrical_capacity > 0
144144
ORDER BY id||version
145145
) as sub
@@ -156,12 +156,12 @@ CREATE MATERIALIZED VIEW supply.ego_dp_res_powerplant_nep2035_mview AS
156156
FROM supply.ego_dp_res_powerplant
157157
WHERE scenario in ('NEP 2035')
158158

159-
AND version in ('v0.4.2','v0.4.4','v0.4.5')
159+
AND version in ('v0.4.4','v0.4.5')
160160
Group BY id||version
161161
Order by id||version)
162162
AND scenario in ('NEP 2035')
163163
And preversion = 'v0.3.0'
164-
AND version in ('v0.4.2','v0.4.4','v0.4.5')
164+
AND version in ('v0.4.4','v0.4.5')
165165
AND electrical_capacity > 0
166166
ORDER BY id||version
167167
) sub2
@@ -183,13 +183,13 @@ CREATE MATERIALIZED VIEW supply.ego_dp_res_powerplant_ego100_mview AS
183183
WHERE id||version not in (
184184
SELECT id||version
185185
FROM supply.ego_dp_res_powerplant
186-
WHERE version in ('v0.4.2','v0.4.4','v0.4.5')
186+
WHERE version in ('v0.4.4','v0.4.5')
187187
Group BY id||version
188188
HAVING count(*) > 1
189189
Order by id||version)
190190
AND scenario = 'Status Quo'
191191
AND preversion = 'v0.3.0'
192-
AND version in ('v0.4.2','v0.4.4','v0.4.5')
192+
AND version in ('v0.4.4','v0.4.5')
193193
AND electrical_capacity > 0
194194
AND generation_type in ('solar','wind')
195195
AND generation_subtype not in ('wind_offshore')
@@ -208,13 +208,13 @@ CREATE MATERIALIZED VIEW supply.ego_dp_res_powerplant_ego100_mview AS
208208
FROM supply.ego_dp_res_powerplant
209209
WHERE scenario in ('eGo 100')
210210
AND generation_type not in ('gas')
211-
AND version in ('v0.4.2','v0.4.4','v0.4.5')
211+
AND version in ('v0.4.4','v0.4.5')
212212
AND flag in ('commissioning', 'repowering')
213213
Group BY id||version
214214
Order by id||version)
215215
AND scenario in ('eGo 100')
216216
And preversion = 'v0.3.0'
217-
AND version in ('v0.4.2','v0.4.4','v0.4.5')
217+
AND version in ('v0.4.4','v0.4.5')
218218
AND electrical_capacity > 0
219219
ORDER BY id||version
220220
) sub2
@@ -230,15 +230,15 @@ CREATE MATERIALIZED VIEW supply.ego_dp_res_powerplant_ego100_mview AS
230230
SELECT id||version
231231
FROM supply.ego_dp_res_powerplant
232232
WHERE scenario in ('NEP 2035')
233-
AND version in ('v0.4.2','v0.4.4','v0.4.5')
233+
AND version in ('v0.4.4','v0.4.5')
234234
AND generation_type not in ('biomass','gas','reservoir','run_of_river')
235235
AND flag in ('commissioning', 'repowering')
236236
AND generation_subtype not in ('wind_offshore')
237237
Group BY id||version
238238
Order by id||version)
239239
AND scenario in ('NEP 2035')
240240
And preversion = 'v0.3.0'
241-
AND version in ('v0.4.2','v0.4.4','v0.4.5')
241+
AND version in ('v0.4.4','v0.4.5')
242242
AND electrical_capacity > 0
243243
ORDER BY id||version
244244
) sub3

0 commit comments

Comments
 (0)