
약간 헤맸다...
with max_length as (
select fish_type, max(length) as length
from fish_info
group by fish_type)
,type_info as (
select i.id, m.fish_type, m.length
from max_length m
join fish_info i on i.fish_type = m.fish_type
where i.length = m.length)
select ti.id, ni.fish_name, ti.length
from type_info ti join fish_name_info ni on ti.fish_type = ni.fish_type
order by id