문제
풀이
SELECT a.animal_id, a.name
from animal_outs a join animal_ins b
on a.animal_id = b.animal_id
order by a.datetime - b.datetime desc
limit 2;
'algorithm' 카테고리의 다른 글
[programmers] MySQL - Lv.3 있었는데요 없었습니다 (join) (0) | 2022.09.26 |
---|---|
[HackerRank] MySQL - Weather Observation Station 11 (0) | 2022.09.24 |
[HackerRank] MySQL - Weather Observation Station 10 (0) | 2022.09.24 |
[programmers] MySQL - Lv.3 오랜 기간 보호한 동물 (1) (join) (0) | 2022.09.24 |
[HackerRank] MySQL - Weather Observation Station 9 (0) | 2022.09.22 |