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

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

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

select
    b.o_date as date,
    concat(round(b.cnt*100/a.cnt,1),'%') as cr
from
(
select
    date(visit_time) as vi_date,
    count(distinct user_id) as cnt
from
    visit_tb
group by
    date(visit_time)) a
join
(
    select
        date(order_time) as o_date,
        count(distinct user_id) as cnt
    from
        order_tb
    group by
        date(order_time)
) b on b.o_date=a.vi_date
order by  b.o_date

全部评论

相关推荐

03-10 11:23
门头沟学院 Java
鹿LF:计算机面试就跟数学题一样,没什么实际价值,但只能这么筛选,本质是考察你的努力,智力和学习能力
点赞 评论 收藏
分享
03-03 19:02
已编辑
东华理工大学 Node.js
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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