select
date,
concat (round(order_num / visit_num * 100, 1), '%') cr
from
(
select
date (visit_time) date,
count(distinct user_id) visit_num
from
visit_tb
group by
date (visit_time)
) t join
(
select
date (order_time) date,
count(distinct user_id) order_num
from
order_tb
group by
date (order_time)
) t1 using(date)
group by date

京公网安备 11010502036488号