 CREATE MATERIALIZED VIEW model_draft.ego_supply_res_powerplant_sq_mview AS
     SELECT *
     FROM model_draft.ego_dp_supply_res_powerplant
-    WHERE scenario =  'Status Quo';
+    WHERE scenario =  'Status Quo'
+    AND version = 'v0.3.0';
 
 ALTER MATERIALIZED VIEW model_draft.ego_supply_res_powerplant_sq_mview
     OWNER TO oeuser;

		 AND scenario in ('NEP 2035', 'ego-nep2035')
		 ORDER BY id	
	) sub2
	Order by id;
-- 01:56:3626 hours execution time.

ALTER MATERIALIZED VIEW model_draft.ego_supply_res_powerplant_nep2035_mview

		 AND scenario in ('NEP 2035', 'ego-nep2035')
		 ORDER BY id	
	) sub3
	Order by id
	AND version = 'v0.3.0';

ALTER MATERIALIZED VIEW model_draft.ego_supply_res_powerplant_ego100_mview
    OWNER TO oeuser;
