-/*
+﻿/*
 SQL Script to create mviews diyplaying power plants by scenario.
 
 __copyright__ = "Europa-Universität Flensburg - ZNES"

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';

-- MView for NEP 2035
DROP MATERIALIZED VIEW IF EXISTS model_draft.ego_supply_res_powerplant_nep2035_mview CASCADE;

	WHERE scenario in('Status Quo','NEP 2035', 'eGo 100')
	AND fuel = 'pumped_storage'
	AND capacity >= 0
	AND shutdown IS NULL or shutdown >= 2049
	And version = 'v0.3.0';


--------------------------------------------------------------------------------
