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


京公网安备 11010502036488号