select * from (select ROW_NUMBER() OVER (PARTITION BY B.CALLING_NO ORDER BY B.ID DESC) RN,
..................) WHERE RN =1
select * from (select ROW_NUMBER() OVER (PARTITION BY B.CALLING_NO ORDER BY B.ID DESC) RN,
..................) WHERE RN =1