https://school.programmers.co.kr/learn/courses/30/lessons/59045
-- 들어올 때 중성화 X
-- 나갈 때 중성화 O
-- INS와 OUTS를 비교해서 SEX_UPON_INTAKE가 다른 값 찾기
SELECT I.ANIMAL_ID, I.ANIMAL_TYPE, I.NAME
FROM ANIMAL_INS I
JOIN ANIMAL_OUTS O
ON I.ANIMAL_ID = O.ANIMAL_ID
WHERE I.SEX_UPON_INTAKE != O.SEX_UPON_OUTCOME
GROUP BY I.ANIMAL_ID
ORDER BY I.ANIMAL_ID ASC;