题解 | 统计用户从访问到下单的转化率
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;