diff options
Diffstat (limited to 'sql/et_tables.sql')
| -rw-r--r-- | sql/et_tables.sql | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/sql/et_tables.sql b/sql/et_tables.sql index 1ddeff67..f9f85d10 100644 --- a/sql/et_tables.sql +++ b/sql/et_tables.sql @@ -398,15 +398,6 @@ CREATE VIEW latest_markit_prices AS FROM (SELECT MAX(pricingdate) AS latestdate, loanxid FROM markit_prices GROUP BY loanxid) a JOIN markit_prices b ON a.loanxid = b.loanxid AND a.latestdate= b.pricingdate; -CREATE OR REPLACE FUNCTION best_price (price1 float, pricedt1 date, price2 float, pricedt2 date) - RETURNS float -AS $$ - if price1 is None: - return price2 - if price2 is None: - return price1 - return price1 if pricedt1> pricedt2 else price2 -$$ LANGUAGE plpythonu; CREATE OR REPLACE FUNCTION et_historicaldealinfo (p_dealname varchar(10), p_date date) RETURNS SETOF et_collateral AS $$ |
