其他分享
首页 > 其他分享> > 每日一题-31(销售分析1)

每日一题-31(销售分析1)

作者:互联网

题31:

解题思路:以seller_id进行分组然后计算每一组的销售额,在根据 all()进行筛选。

select
    seller_id
from
    sales
group by seller_id
having
sum(price) >= all(select sum(price) from sales group by seller_id);

标签:group,31,seller,price,sum,id,一题,每日,select
来源: https://blog.csdn.net/Txixi/article/details/121707671