select 
a.course_id,
b.course_name ,
format(count(distinct case when if_sign=1 then user_id end)/count(distinct case when if_vw=1 then user_id end)*100,2) sign_rate
-- select *
from 
behavior_tb a left join course_tb b on a.course_id=b.course_id
group by a.course_id,b.course_name
order by a.course_id

注意使用format,而不是round

format会保留两位小数,round是数值,保留两位小数再乘100之后就没有小数了

format(count(distinct case when if_sign=1 then user_id end)/count(distinct case when if_vw=1 then user_id end)*100,2) sign_rate