Superb Logic where interlligent can understand without explanation
MYSQL\n\nselect id,case\nwhen p_id is null then \'Root\'\nwhen id in (select p_id from tree) and p_id in (select id from tree) then \'Inner\'\nelse \'Leaf\'\nen
# MYSQL\n```\nselect id,case\nwhen p_id is null then \'Root\'\nwhen id in (select p_id from tree) and p_id in (select id from tree) then \'Inner\'\nelse \'Leaf\'\nend as type\nfrom Tree\n```\n# please upvote me it would encourage me alot\n
['Tree', 'MySQL']