select
date1 as date
,concat(round(uv2/uv1*100,1),'%') as cr
from(select
date(visit_time) as date1
,count(distinct user_id) as uv1
from visit_tb
group by 1) t1

left join (select
date(order_time) as date2
,count(distinct user_id) as uv2
from order_tb
group by 1) t2

on t1.date1 = t2.date2
order by 1





基本思路:将两张表改变成日期粒度并进行连接