ICode9

精准搜索请尝试: 精确搜索
  • db2笔记_5_特殊排序2022-08-11 15:02:01

    根据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

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有