首页 > TAG信息列表 > fcustno

db2笔记_5_特殊排序

根据fcustno分类,按ftime排序(不同的fcustno,fnum从1开始算) 取fcustno和对应的最大ftime: select * from ( SELECT FCUSTNO,FTIME,row_number() over(partition by FCustNo order by FTIME desc) fnum from tableName ) where fnum=1; 自定义排序 select * from tableName where