这道拼多多数据分析的题一小时还做不出
全部评论
SELECT
uid
,sum(ordr_amt) ordr_amt
,avg(cmmc_amt) cmmc_amt
FROM
order_info a
join
(
SELECT
friend_uid
,sum(ordr_amt) cmmc_amt
from order_info
group by 1
) b
on a.uid = b.friend_uid
group by 1
相关推荐
相关推荐