edbufe Solved 1 Years ago through
Puzzles
Sorry the problem was in except.
First obtain maximun dates where finished the transactions select ROW_NUMBER() over(partition by accountNo ,instrumentId order by accountNo,instrumentID,tradeDatesOrder ) as id,* from tc76 where TotalQty=0 or tradeDatesO