aboutsummaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/dawn.sql25
1 files changed, 13 insertions, 12 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 144d82a7..8f67bd0f 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -4896,18 +4896,19 @@ AS SELECT cr.period_end_date as periodenddate, cr.fund, cr.trade_ccy AS invccy,
GROUP BY cr.trade_ccy, cr.period_end_date, cr.fund, cr."prime_broker/clearing_broker", (COALESCE(split_part(cr.strategy, '/'::text, 1), 'CASH'::text)), (COALESCE(split_part(cr.strategy, '/'::text, 2), 'CSH_CASH'::text))
ORDER BY cr.period_end_date DESC, fund;
-CREATE OR REPLACE VIEW public.admin_cash_valuations
-AS SELECT valuation_reports.invid,
- valuation_reports.invccy,
- valuation_reports.fund,
- valuation_reports.port,
- valuation_reports.strat,
- valuation_reports.periodenddate,
- valuation_reports.custacctname,
- sum(valuation_reports.endqty) AS endlocalmv
- FROM valuation_reports
- GROUP BY valuation_reports.invccy, valuation_reports.invid, valuation_reports.fund, valuation_reports.port, valuation_reports.strat, valuation_reports.periodenddate, valuation_reports.custacctname
- HAVING valuation_reports.invid = ANY (ARRAY['EUR'::text, 'USD'::text]);
+CREATE OR REPLACE VIEW globeop_cash_valuations
+AS SELECT
+ vr.periodenddate,
+ vr.fund,
+ vr.invid,
+ vr.invccy,
+ vr.port,
+ vr.strat,
+ vr.custacctname,
+ sum(vr.endqty) AS endlocalmv
+ FROM valuation_reports vr
+ GROUP BY vr.invccy, vr.invid, vr.fund, vr.port, vr.strat, vr.periodenddate, vr.custacctname
+ HAVING vr.invid = ANY (ARRAY['EUR'::text, 'USD'::text]) ORDER BY periodenddate DESC, fund;
CREATE VIEW eur_fx_valuations AS