 		 AND scenario in ('NEP 2035', 'ego-nep2035')
 		 ORDER BY id	
 	) sub2
-	Order by id;
+	Order by id
+	AND version = 'v0.3.0';
 -- 01:56:3626 hours execution time.
 
 ALTER MATERIALIZED VIEW model_draft.ego_supply_res_powerplant_nep2035_mview

	FROM model_draft.ego_dp_supply_conv_powerplant
	WHERE scenario in('Status Quo','NEP 2035', 'eGo 100')
	AND fuel = 'pumped_storage'
	AND capacity >= 0;

ALTER MATERIALIZED VIEW model_draft.ego_supply_conv_powerplant_ego100_mview
    OWNER TO oeuser;

CREATE MATERIALIZED VIEW model_draft.ego_supply_conv_powerplant_sq_mview AS
    SELECT *
    FROM model_draft.ego_dp_supply_conv_powerplant
    WHERE scenario = 'Status Quo'
    AND version = 'v0.3.0';

ALTER MATERIALIZED VIEW model_draft.ego_supply_conv_powerplant_sq_mview
    OWNER TO oeuser; 
