Untitled
unknown
plain_text
5 months ago
1.4 kB
3
Indexable
select to_char(pa.delivered,'MM') as "Delivery month", pa.delivered as "Delivery Day", pa.period as "Delivery Period", sum(pa.trade_volume) as "P-Trade Volume-MWh", pa.trade_price as "P-Trade Price-(£)", a.ticket as "Ticket", a.buy_sell as "Trade Buy Sell", a.counterparty as "Counteparty", a.memo as "Memo", a.memo2 as "Memo2", a.book as "Book", t.name as "Trader Name", sp.efa_period as "EFA Block", a.traded_on as "Trdaed on Day" from bo_user_uniper.pm_settlement_period sp, bo_user_uniper.pm_trade_period_asof pa, bo_user_uniper.pm_trade_asof a, pos_mgnt.bo_trader t where pa.trade_asof_date=a.asof_date and sp.settlement_day=pa.delivered and sp.settlement_period=pa.period and pa.ticket=a.ticket and a.trader=t.trader and a.asof_date = (to_date('31-OCT-2024','dd-MON-yyyy')+1) --<< replace hardcoded date with your END date and a.book in ( 'UPSL','PXHS' ) and ( a.counterparty like '%-E' or a.counterparty like 'UPT%') and pa.delivered between to_date('01-OCT-2024','dd-MON-yyyy') and to_date('31-OCT-2024','dd-MON-yyyy') --<< replace hardcoded date with your START/END date group by to_char(pa.delivered,'MM'), pa.delivered, pa.period, pa.trade_price, a.ticket, a.buy_sell, a.counterparty, a.memo, a.memo2, a.book, t.name, sp.efa_period, a.traded_on
Editor is loading...
Leave a Comment