select * from table where aa in(select max(aa) from table group by id);
解决方案 »
- 问个sql语句,统计两个字段组合的行数,要把行数为0的情况也列出来,谢谢
- linux oracle 下 存储过程调用java执行系统命令失败
- ORACLE FUNCTION问题,大惑不解请高手指点如何解决?
- oracle触发器插入问题
- 如何将2个整型字段相加。在线等~~急~~~
- 在asp.net里遇到的oracle问题高手帮忙啊
- 请各位高人帮忙将这个MSSQL中写的触发器修改成在oracle下能用的触发器,急需啊!!解决了高分回报!!!
- 请教,使用UTL_FILE对文件的删除及文件中数据的删除操作!!
- 请教:小弟刚学oracle,我已经建立了一个数据库名叫ora8然后为其配置了一个服务名new,配置了一个监听程序,在sql plus中,以system/manag
- 如何是用job完成每有1日对表A纪录清零
- 字段IMAGE为BLOB类型,select length(image) from table,在9I中可以,但在8I中却不行,该怎么办呢?
- 安装oracle出现的问题
select *
from table a,
(select id,max(aa) aa
from table
group by id) b
where a.id=b.id
and a.aa=b.aa
select distinct id,max(aa) over (partition by id) aa
from table
)
select * from table inner join Y on table.id = y.id and table.aa = y.aa
select id ,aa, other, rank()over(partition by id order by aa desc) rank_aa
from test )
where rank_aa = 1;