select a.* from scholars a where 4 > (select count(*) from scholars where name = a.name and quote_num > a.quote_num ) order by a.name,a.quote_num;
查找 scholars 表 并按照name分组,且每组按照quote_num大小降序,最终获取每组quote_numjian降序后的前四条数据。
select a.* from scholars a where 4 > (select count(*) from scholars where name = a.name and quote_num > a.quote_num ) order by a.name,a.quote_num;
查找 scholars 表 并按照name分组,且每组按照quote_num大小降序,最终获取每组quote_numjian降序后的前四条数据。