Damit Left Join wirksam wird, müssen Sie die Bedingung earned_trophys.user_id = 1
verschieben in den on
-Klausel anstelle von where
.
select
trophy.name,
earned_trophys.user_id,
count(user_id) as temp
from
trophy
left join
earned_trophys
on
trophy.trophy_id = earned_trophys.trophy_id and earned_trophys.user_id = 1
group by
name