当前位置:Gxlcms > 数据库问题 > 获取数据库分组后的最大值

获取数据库分组后的最大值

时间:2021-07-01 10:21:17 帮助过:4人阅读

from scott.emp e, (select e.deptno, max(e.sal) sal from scott.emp e group by e.deptno) me  where e.deptno = me.deptno  and e.sal = me.sal; 

2.查找某个表 lampa 按字段evno分组,求字段inte的最大值

select * from lampa a where 1>(select count(*) from lampa where a.evno=evno and a.inte<inte)

 

获取数据库分组后的最大值

标签:

人气教程排行