aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sql/dawn.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 54d5fd93..3a62c3a0 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -3014,7 +3014,7 @@ SUM(cds.notional * (CASE WHEN protection='Buyer' THEN 1 ELSE -1 END)) AS notiona
WHERE swap_type='CD_INDEX' AND trade_date<=start_from AND maturity > start_from
GROUP BY cds.security_id, maturity, cds.folder, cds.fund, account_code) a
LEFT JOIN portfolio_folder_mapping pfm ON replace(a.folder::text, 'SER_', '')=pfm.clean_folder
-LEFT JOIN index_maturity_markit imm ON (a.SECURITY_id, a.maturity) = (imm.redindexcode, imm.maturity) WHERE active AND a.notional !=0;
+LEFT JOIN index_maturity_markit imm ON (a.SECURITY_id, a.maturity) = (imm.redindexcode, imm.maturity) WHERE active AND abs(a.notional) >1;
end;
$function$
;