aboutsummaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to '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 630568d5..07ac59b9 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -791,7 +791,7 @@ $$ LANGUAGE plpgsql;
CREATE VIEW bond_trades AS
(SELECT dealid, tradeid, bond_allocation.id AS id, identifier, description, asset_class, trade_date, settle_date, buysell, price, accrued, folder,
- principal_payment * notional/sum(notional) OVER w AS principal_payment, accrued_payment* notional/sum(notional) OVER w AS accrued_payment ,
+ principal_payment * notional/sum(notional) OVER w AS principal_payment, accrued_payment* notional/sum(notional) OVER w AS accrued_payment, (principal_payment + accrued_payment) * notional/sum(notional) OVER w AS net_amount,
current_face * notional/sum(notional) OVER w AS current_face , notional AS faceamount, fund, counterparties.code AS cp_code, counterparties.name AS counterparty
FROM bonds LEFT JOIN bond_allocation ON bonds.id = bond_allocation.tradeid
LEFT JOIN accounts USING (code)