题解 | 统计用户从访问到下单的转化率
统计用户从访问到下单的转化率
https://www.nowcoder.com/practice/eaff8684aed74e208300f2737edbb083
select t1.date, concat(round((n1/n2)*100,1),'%') as cr
from (
select date(order_time) as date ,count(distinct user_id) as n1
from order_tb
group by date(order_time)
) as t1
join (
select date(visit_time) as date ,count(distinct user_id) as n2
from visit_tb
group by date(visit_time)
) as t2
on t1.date=t2.date
group by t1.date
order by t1.date
查看24道真题和解析