diff options
Diffstat (limited to 'sql/dawn.sql')
| -rw-r--r-- | sql/dawn.sql | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql index e454b175..cabe0f43 100644 --- a/sql/dawn.sql +++ b/sql/dawn.sql @@ -3997,7 +3997,8 @@ CREATE TABLE custodian_wires( currency currency, amount float8 NOT NULL, wire_details text, - unique_ref text PRIMARY KEY); + unique_ref text PRIMARY KEY, + custodian custodian NOT NULL); @@ -4191,4 +4192,6 @@ si.currency, si.fund, COALESCE(pfm.folder::text, strategy::text) AS folder FROM (SELECT *, rank() OVER(PARTITION BY si.broker,si.fund ORDER BY date desc) FROM strategy_im si WHERE si.fund=p_fund AND si.date<=p_date ORDER BY date DESC) si LEFT JOIN portfolio_folder_mapping pfm ON pfm.clean_folder=si.strategy::TEXT -WHERE RANK=1 and abs(amount) >= .01; END $$ LANGUAGE plpgsql;
\ No newline at end of file +WHERE RANK=1 and abs(amount) >= .01; END $$ LANGUAGE plpgsql; + +CREATE TYPE custodian AS ENUM('BNY', 'UMB', 'NT');
\ No newline at end of file |
