方法一:dense_rank()结合group by一起使用
select seller_id from ( select seller_id, dense_rank() over (order by sum(price) desc) r from Sales group by seller_id ) a where r=1;
方法二:all
select seller_id from Sales group by seller_id having sum(price)>=all( select sum(price) from Sales group by seller_id);
这是一个多行子查询;all表示和子查询返回的所有值比较。