select id, FISH_NAME, LENGTH
from fish_info i
join FISH_NAME_INFO n
on i.FISH_TYPE=n.FISH_TYPE
where (i.fish_type, length) in (select fish_type, max(ifnull(length, 10))
from fish_info
group by fish_type)
'언어' 카테고리의 다른 글
중복 제거 (0) | 2024.07.12 |
---|---|
format 소수 n번째 자리까지 (0) | 2024.07.11 |
union all (0) | 2024.07.08 |
percent_rank, ntile (0) | 2024.07.08 |
비트연산 (0) | 2024.07.02 |