select b.* from (select * from (select Comid,max(ctime) ctime from job group by Comid) a order by a.ctime) b where rownum < 11;
直接 select * from job where rownum < 11 group by company order by time
select a.* from (select Comid from job group by Comid order by max(time))a where rownum<11
select rownum rm,a.* from (select id,rank() over (partition by id order by time desc) num from job order by time desc) a where num=1 and rm<11
呵呵,都不行呢,不过问题已经在另一个帖子解决了,是 select * from ( select Comid, max(time) as lasttime from job group by Comid order by lasttime desc ) where rownum < 11;酌情放分...
select * from job where rownum < 11 group by company order by time
select * from ( select Comid, max(time) as lasttime from job group by Comid order by lasttime desc ) where rownum < 11;酌情放分...