select
df1.course_id,
df2.course_name,
round((count(case when df1.if_sign=1 then df1.user_id end)/count(case when df1.if_vw=1 then df1.user_id end))*100,2) as "sign_rate(%)"
from behavior_tb as df1
left join course_tb as df2
on df1.course_id = df2.course_id
group by df1.course_id,df2.course_name
order by df1.course_id