[Programmers][SQL] 보호소에서 중성화한 동물 (59045번) - MySQL Solution
문제
- https://programmers.co.kr/learn/courses/30/lessons/59045
Solution
SELECT INS.ANIMAL_ID, INS.ANIMAL_TYPE, INS.NAME
FROM ANIMAL_INS AS INS INNER JOIN ANIMAL_OUTS AS OUTS ON INS.ANIMAL_ID = OUTS.ANIMAL_ID
WHERE INS.SEX_UPON_INTAKE != OUTS.SEX_UPON_OUTCOME
ORDER BY INS.ANIMAL_ID
Leave a comment