     AND (shutdown IS NULL or shutdown >= 2015)
     AND capacity > 0
     AND preversion = 'v0.3.0';
-    --AND version in ('v0.4.2','v0.4.4','v0.4.5');
+    --AND version in ('v0.4.4','v0.4.5');
 
 
 ALTER MATERIALIZED VIEW supply.ego_dp_conv_powerplant_sq_mview

			FROM supply.ego_dp_res_powerplant
			WHERE scenario in ('eGo 100')
			AND generation_type not in ('gas')
			AND version in ('v0.4.2','v0.4.4','v0.4.5')
			AND flag in ('commissioning', 'repowering')
			Group BY id||version
			Order by id||version)
		 AND scenario in ('eGo 100')
		 And preversion = 'v0.3.0'
		 AND version in ('v0.4.2','v0.4.4','v0.4.5')
		 AND electrical_capacity > 0
		 ORDER BY id||version	
	) sub2

			WHERE id||version not in (
			SELECT  id||version
			FROM supply.ego_dp_res_powerplant
			WHERE version in ('v0.4.4','v0.4.5')
			Group BY id||version
			HAVING count(*) > 1
			Order by id||version)
		 AND scenario = 'Status Quo'
		 And preversion = 'v0.3.0'
		 AND version in ('v0.4.4','v0.4.5')
		 AND electrical_capacity > 0
		 ORDER BY id||version	
		 ) as sub
