didnt work actually,
and seq_no = (select MAX(seq_no) from INVS_TXN_HEAD)
it's still giving all the 5 rows....
User Profile
Collapse
-
knowing jusT the lasT row
...Code:SQL> ED Wrote file afiedt.buf 1 select ROUND(avgprice, 10) avgprice, SeQ_no 2 from (select b.*, 3 sum(decode(INVXH_code, 'BUY', invxh_TOTAL_QTY, -invxh_TOTAL_QTY)) OVER (ORDER BY INVXH_date) BALQTY, 4 row_number() over (order by invxh_DATE) seq_no 5 from INVS_TXN_HEAD b) 6 -- where INVXH_BROK_code = :INVXH_BROK_code 7
No activity results to display
Show More
Leave a comment: