select 
round(sum(max_score)/count(distinct rec_user),3) as avg_score
from 
(select
rec_user,hobby_l,max(score) as max_score
from recommend_tb as rt
join user_action_tb as uat 
on rec_user = user_id
where hobby_l = rec_info_l
group by 1
) t1