网上查了好多,不过感觉都不能直接拿来用。个人就直接对数据排序然后输出,top函数不知道怎么回事用不来,直接用limit限制输出个数来假装top了
select col from tb group by col
order by count(*) desc
limit k
网上查了好多,不过感觉都不能直接拿来用。个人就直接对数据排序然后输出,top函数不知道怎么回事用不来,直接用limit限制输出个数来假装top了
select col from tb group by col
order by count(*) desc
limit k