题解 | 统计用户从访问到下单的转化率

select date(v.visit_time) as date,
concat(round(count(distinct o.user_id)*100 / count(distinct v.user_id),1), '%') as cr
from visit_tb v
left join  -- 思考表的连接方式
order_tb o
on v.user_id = o.user_id
and date(v.visit_time) = date(o.order_time)
group by date
order by date;

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-01 17:00
点赞 评论 收藏
分享
06-13 10:15
门头沟学院 Java
想去夏威夷的大西瓜在...:我也是27届,但是我现在研一下了啥项目都没有呀咋办,哎,简历不知道咋写
点赞 评论 收藏
分享
牛客92804383...:在他心里你已经是他的员工了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务