✅MySQL || Beginner level||Simple-Short -Solution✅
Please upvote to motivate me in my quest of documenting all leetcode solutions. HAPPY CODING:)\nAny suggestions and improvements are always welcome.\n==========
**Please upvote to motivate me in my quest of documenting all leetcode solutions. HAPPY CODING:)\nAny suggestions and improvements are always welcome.***\n*====================================================================*\n\u2705 **MySQL Code :**\n**Runtime:** 369 ms, faster than 91.58% of MySQL online submissions for Tree Node.\n```\nSELECT id,\nCASE WHEN p_id IS null THEN \'Root\'\n     WHEN id IN (SELECT p_id FROM tree) THEN \'Inner\'\n     ELSE \'Leaf\' END AS type\nFROM tree\n```\n**Runtime:** 369 ms\n**Memory Usage:**  0B\n________________________________\n__________________________________\n\nIf you like the solution, please upvote \uD83D\uDD3C\nFor any questions, or discussions, comment below. \uD83D\uDC47\uFE0F
['MySQL']