diff options
| -rw-r--r-- | sql/dawn.sql | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql index 593c92d9..64f10422 100644 --- a/sql/dawn.sql +++ b/sql/dawn.sql @@ -1082,6 +1082,55 @@ SELECT DISTINCT ON (dealid) dealid, folder, index, series, ON index_desc.redindexcode=cds.security_id AND index_desc.maturity=cds.maturity ORDER BY dealid, trade_date; +CREATE OR REPLACE VIEW isosel_pnl_report AS +SELECT citco_reports.period_end_date, + citco_reports."quantity(end)", + citco_reports.bloomberg_code, + citco_reports.symbol, + citco_reports.strategy, + citco_reports."prime_broker/clearing_broker", + citco_reports.subfund, + citco_reports.cusip, + citco_reports.isin, + citco_reports.base_price, + citco_reports.base_market_value, + citco_reports.underlying_currency_code, + citco_reports.security_description, + citco_reports.security_asset_name, + citco_reports.security_asset_class, + citco_reports.underlying_symbol, + citco_reports.factor, + citco_reports.underlying_red, + citco_reports."mtd_base_unrealized_p&l", + citco_reports."mtd_base_realized_p&l", + citco_reports."daily_base_p/l", + citco_reports."monthly_base_p/l" + FROM citco_reports + WHERE citco_reports.subfund = 'ISOSEL_DFLT'::text; + +CREATE OR REPLACE VIEW isosel_val_report AS +SELECT citco_reports.period_end_date, + citco_reports."quantity(end)", + citco_reports.bloomberg_code, + citco_reports.symbol, + citco_reports.strategy, + citco_reports."prime_broker/clearing_broker", + citco_reports.subfund, + citco_reports.cusip, + citco_reports.isin, + citco_reports.base_price, + citco_reports.base_market_value, + citco_reports.underlying_currency_code, + citco_reports.security_description, + citco_reports.security_asset_name, + citco_reports.security_asset_class, + citco_reports.underlying_symbol, + citco_reports.factor, + citco_reports.underlying_red, + citco_reports.total_fund_capital + FROM citco_reports + WHERE citco_reports.subfund = 'ISOSEL_DFLT'::text; + CREATE OR REPLACE VIEW external_marks_mapped AS select date, identifier, mark, b.final as source from external_marks a left join mark_source_mapping b on a.source = b.globeop order by a.date asc; |
