第二题用了两个嵌套,求大佬看看 Select d.sum_view, avg(d.user_avg_age) as avg_age From ( Select c.user_id, count(c.pv_id) as sum_view, avg(c.now_age) as user_avg_age from (select a.user_id, a.pv_id, (a. creat_time-b. creat_time+b.age) as now_age From pv_log a Inner join dimuser b On a.user_id = b.user_id ) c Group by c.user_id ) d Group by d.sum_view
点赞 评论

相关推荐

10-13 17:47
门头沟学院 Java
wulala.god:图一那个善我面过,老板网上找的题库面的
点赞 评论 收藏
分享
三年之期已到我的offer快到碗里来:9硕都比不上9本
点赞 评论 收藏
分享
牛客网
牛客企业服务