select avg(b.score) as avg_score from
(select * from
(select 
if(rt.rec_info_l=uat.hobby_l,1,0) as yes_or_no,
uat.score,
uat.hobby_l
from 
recommend_tb as rt left join user_action_tb as uat 
on rt.rec_user=uat.user_id) as a where a.yes_or_no=1 group by a.score,a.hobby_l) as b