最大值:select max(num) from table
第二大值:select max(num) from table
where num not in(select max(num) from table)
第三大值:select max(num) from table
where num not in(select max(num) from table
where num not in(select max(num) from table))
最小值:select min(num) from table
mysql 查询 最大值,最小值,第二大,第三大 一共四个值
原文:https://www.cnblogs.com/meimei00/p/10558750.html