题目链接:点击打开链接
题目大意:略。
解题思路:略。
AC 代码
-- 解决方案(1)
select
seller_id
from
sales
group by seller_id
having
sum(price) >= all(select sum(price) from sales group by seller_id)
-- 解决方案(2)
SELECT seller_id
FROM Sales
GROUP BY seller_id
HAVING SUM(price) = (SELECT SUM(price) SUMN FROM Sales GROUP BY seller_id ORDER BY SUMN DESC LIMIT 1)