About this tutorial
Compare analytical and booked Repo P&L
Continue from the previous Repo P&L calculation tutorial. We aggregate the analytical results and the corresponding general ledger entries at the same level: GL account, instrument, ISIN and currency.
Using Common Table Expressions (CTEs), UNION ALL and conditional aggregation, we bring both sides together and calculate the difference between analytical and booked P&L.