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;

京公网安备 11010502036488号