看来要用到group by,懒得想。 你可以转发到oracle论坛,那里高手多。http://community.csdn.net/expert/deeptree/RoomForum.asp?bigroomid=61

解决方案 »

  1.   

    oracle 基础和管理 论坛
    http://community.csdn.net/expert/deeptree/RoomForum.asp?roomid=6101
      

  2.   

    表news,有字段id,bt(标题),sj(时间),lb(类别)
    select t.* from 
    (select news.*,rank() over(partition by lb order by sj desc) rk from news) t
    where rk<=10;
      

  3.   

    select id,bt,sj,lb from (
    select (rank() over (partition by lb order by lb asc,sj desc)) rk,id,bt,sj,lb)
    where rk<=10;
      

  4.   

    select id,bt,sj,lb from 
    (select news.*,rank() over(partition by lb order by sj desc) rk from news) t
    where rk<=10 order by lb;
      

  5.   

    提示出错:ORA-00439:未启用特征:OLAP WINDOW FUNCTIONS,该怎么处理。
      

  6.   

    不支持分析函数。
    try:
    select * from news t
    where (select count(*) from news tt where tt.sj<=t.sj and t.lb=tt.lb)<11;