题解 | #统计每个学校的答过题的用户的平均答题数#

为什么一定要使用连接查询???
select university,count(question_id) / count(distinct question_practice_detail.device_id) avg_answer_cnt
from user_profile,question_practice_detail
where user_profile.device_id=question_practice_detail.device_id
group by university
不也一样??
全部评论

相关推荐

剑桥断刀:找啥工作,牛客找个比如大厂软开或者随便啥的高薪牛马,大把没碰过妹子的技术仔,狠狠拿捏爆金币
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务