diff options
| -rw-r--r-- | sql/dawn.sql | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql index c7221ac0..ad552352 100644 --- a/sql/dawn.sql +++ b/sql/dawn.sql @@ -1795,8 +1795,9 @@ SELECT swaptions.id, strike, NOT buysell AS buysell, -termination_fee AS fee -FROM terminations LEFT JOIN swaptions USING (dealid) +FROM terminations RIGHT JOIN swaptions USING (dealid) LEFT JOIN counterparties ON termination_cp = code +WHERE termination_date IS NOT NULL UNION ALL ( SELECT id, dealid, @@ -1843,9 +1844,9 @@ SELECT cds.id, END AS protection, termination_fee AS upfront, ref -FROM terminations LEFT JOIN cds USING (dealid) +FROM terminations RIGHT JOIN cds USING (dealid) left JOIN counterparties on termination_cp=code -WHERE trade_date is NOT NULL +WHERE termination_date is NOT NULL UNION ALL ( SELECT id, dealid, |
