레벨 2
String, Date
https://programmers.co.kr/learn/courses/30/lessons/59409
이 문제는 두가지 방법으로 풀 수 있다.
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;
SELECT ANIMAL_ID, NAME,
IF(SEX_UPON_INTAKE LIKE "%Neutered%" OR SEX_UPON_INTAKE LIKE "%Spayed%", "O","X") AS "중성화"
FROM ANIMAL_INS
ORDER BY ANIMAL_ID;