发布网友 发布时间:2022-04-22 20:49
共2个回答
热心网友 时间:2022-04-08 04:16
select max(count) from 表 where count not in (select max(count) from 表)
这是sql server的语法,你换成oracle的就行了
热心网友 时间:2022-04-08 05:34
select * from (
select col1, count(1) , row_number() over(order by count(1) desc) row_num from al
group by col1
) where row_number = 2