题解 | #分组计算练习题#
分组计算练习题
https://www.nowcoder.com/practice/009d8067d2df47fea429afe2e7b9de45
Select gender,university, count(device_id) as user_num, avg(active_days_within_30) as avg_active_days, avg(question_cnt) as avg_question_cnt from user_profile group by gender,university
count(device_id)这一点没有想到,group by可以单独使用,我一直试图在where后面添加group by,所以一直失败。这道题挺难的