with T1 as ( select date(o.order_time) as day,count(distinct(o.user_id)) as orderdone from order_tb o group by (date(o.order_time)) ),T2 as ( select date(v.visit_time) as day,count(distinct(v.user_id)) as ordertot from visit_tb v group by (date(v.visit_time)) ) select t2.day as date, concat(round(t1.orderdone/t2.ordertot*100,1),'%') as cr from T2 t2 left join T1 t1 on t1.day=t2.day