✅ 100% EASY || FAST 🔥|| CLEAN SOLUTION 🌟
\n\n# Code\n\n/* Write your PL/SQL query statement below */\nselect id,case when p_id is null then \'Root\'\n\nwhen id  in(select distinct(p_id) from tree ) \n\
\n\n# Code\n```\n/* Write your PL/SQL query statement below */\nselect id,case when p_id is null then \'Root\'\n\nwhen id  in(select distinct(p_id) from tree ) \n\nthen \'Inner\' else \'Leaf\' end as type from tree ;\n```\n![5kej8w.jpg](https://assets.leetcode.com/users/images/4ab13940-5d60-463e-bfda-cd90f6aec938_1717406895.7343318.jpeg)
['Oracle']