题解 | 统计商家不同会员每日访问人次及访问人数count() group by order by

select
    vip,
    count(vip) visit_nums,
    count(distinct v.user_id) visit_users
from visit_tb v
left join uservip_tb u on  v.user_id=u.user_id
group by vip
order by visit_nums desc

全部评论

相关推荐

评论
点赞
收藏
分享
牛客网
牛客企业服务