oracle 按字段排序 取第一条数据

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

..................) WHERE RN =1

 

你可能感兴趣的:(数据库)