题解 | #分组过滤练习题#

分组过滤练习题

https://www.nowcoder.com/practice/ddbcedcd9600403296038ee44a172f2d

select t1.university,avg_question_cnt,avg_answer_cnt
from
(
    select university, avg(question_cnt) as avg_question_cnt
    from user_profile
    group by university)t1
join 
(
    select university, avg(answer_cnt) as avg_answer_cnt
    from user_profile
    group by university 
)t2
on t1.university=t2.university
where avg_question_cnt<5 or avg_answer_cnt<20

全部评论

相关推荐

03-29 12:10
门头沟学院 C++
挣K存W养DOG:散漫消极者淘汰,一眼坑爹。实习几个月转正的时候说你加班太少,能力还行态度不够积极裁了,马上老实。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务