コードテスト練習>JOIN>保護所で中性化した動物


SELECT OUTS.ANIMAL_ID, OUTS.ANIMAL_TYPE, OUTS.NAME
FROM ANIMAL_INS AS INS
RIGHT JOIN ANIMAL_OUTS AS OUTS 
ON INS.ANIMAL_ID = OUTS.ANIMAL_ID
WHERE INS.SEX_UPON_INTAKE LIKE "Intact%" AND OUTS.SEX_UPON_OUTCOME NOT LIKE "Intact%"
ORDER BY INS.ANIMAL_ID ASC