diff options
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/dawn.sql | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql index 30782a24..96bf50af 100644 --- a/sql/dawn.sql +++ b/sql/dawn.sql @@ -1047,7 +1047,7 @@ SELECT id, trade_date, security_id, security_desc, maturity, fixed_rate, currenc cp_code FROM cds LEFT JOIN ( SELECT dealid, SUM(termination_amount) AS terminated_amount - FROM terminations WHERE fee_payment_date <= p_date GROUP BY dealid) b USING (dealid) + FROM terminations WHERE fee_payment_date < p_date GROUP BY dealid) b USING (dealid) WHERE fund=p_fund and notional IS DISTINCT FROM terminated_amount AND trade_date <= p_date AND maturity > p_date; END; |
