with
    temp as (
        select distinct
            user_id,
            score
        from
            recommend_tb r
            join user_action_tb u on u.user_id = r.rec_user
        where
            rec_info_l = hobby_l
    )
select
    sum(score) / count(*) as avg_score
from
    temp;