select b.animal_id, b.name
from animal_ins a right join animal_outs b on a.animal_id = b.animal_id
where a.animal_id is null
order by b.animal_id
SELECT a.ANIMAL_ID,a.NAME
FROM ANIMAL_INS a join ANIMAL_OUTS b on a.ANIMAL_ID = b.ANIMAL_ID
WHERE a.DATETIME > b.DATETIME
ORDER BY a.DATETIME
SELECT a.NAME, a.DATETIME
FROM ANIMAL_INS a left join ANIMAL_OUTS b on a.ANIMAL_ID = b.ANIMAL_ID
WHERE b.ANIMAL_ID is NULL
ORDER BY a.DATETIME
LIMIT 3
SELECT a.ANIMAL_ID, a.ANIMAL_TYPE, a.NAME
FROM ANIMAL_INS a join ANIMAL_OUTS b on
a.ANIMAL_ID = b.ANIMAL_ID
WHERE a.SEX_UPON_INTAKE LIKE "%Intact%" and b.SEX_UPON_OUTCOME NOT LIKE "%Intact%"
ORDER BY a.ANIMAL_ID