문제 링크
요약
parent_item_id로 사용되지 않는 애들을 고르면 된다.
최종
결과
parent_item_id로 사용되지 않는 애들을 고르면 된다.
SELECT i.item_id, i.item_name, i.rarity
FROM item_info i LEFT JOIN item_tree t ON i.item_id = t.parent_item_id
WHERE t.parent_item_id IS NULL
ORDER BY i.item_id DESC