aboutsummaryrefslogtreecommitdiffstats
path: root/sql/dawn.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/dawn.sql')
-rw-r--r--sql/dawn.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index e55ee7bb..65d53060 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -747,7 +747,7 @@ RETURN QUERY
WITH tmp AS (SELECT cds.security_id, cds.security_desc, cds.maturity, cds.fixed_rate,
cds.currency, cds.folder,
SUM(cds.notional)
- OVER (PARTITION BY cds.security_id, cds.maturity, cds.folder, cds.account_code) AS notional
+ OVER (PARTITION BY cds.security_id, cds.maturity, cds.folder, cds.fcm) AS notional
FROM list_cds(p_date) cds WHERE (cds.attach is NULL AND cds.folder != 'MBSCDS' AND cds.fcm=fcm))
SELECT DISTINCT ON (tmp.security_id, tmp.maturity, tmp.folder) * FROM tmp WHERE tmp.notional!=0;
END;