문제
풀이
SELECT animal_id, name,
case
when sex_upon_intake like 'Neutered%' or
sex_upon_intake like 'Spayed%' then 'O'
else 'X'
end as 중성화
from animal_ins
order by animal_id;
'algorithm' 카테고리의 다른 글
[programmers] MySQL - Lv.3 오랜 기간 보호한 동물 (1) (join) (0) | 2022.09.24 |
---|---|
[HackerRank] MySQL - Weather Observation Station 9 (0) | 2022.09.22 |
[HackerRank] MySQL - Weather Observation Station 8 (1) | 2022.09.21 |
[programmers] MySQL - Lv.2 DATETIME에서 DATE로 형변환 (1) | 2022.09.21 |
[HackerRank] MySQL - Weather Observation Station 7 (0) | 2022.09.20 |