๋ฌธ์
๋ณดํธ์์์ ์ค์ฑํํ ๋๋ฌผ
ํ์ด
SELECT AI.ANIMAL_ID, AI.ANIMAL_TYPE, AI.NAME
FROM ANIMAL_INS AI JOIN ANIMAL_OUTS AO
ON AI.ANIMAL_ID = AO.ANIMAL_ID
WHERE (AI.SEX_UPON_INTAKE LIKE 'Intact%') AND (AO.SEX_UPON_OUTCOME LIKE 'Spayed%' OR AO.SEX_UPON_OUTCOME LIKE 'Neutered%')
ORDER BY 1
;
- WHERE ์กฐ๊ฑด์ ๋ค์๊ณผ ๊ฐ์ด ์์ฑํด๋ ๋ฉ๋๋ค.
WHERE AI.SEX_UPON_INTAKE LIKE 'Intact%' AND AO.SEX_UPON_OUTCOME NOT LIKE 'Intact%'