Skip to content

Commit

Permalink
Q608 added.
Browse files Browse the repository at this point in the history
  • Loading branch information
isinsuarici committed Apr 4, 2023
1 parent 48085a0 commit 648b2f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SQL/Q608.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
select id,case when p_id is null then 'Root'
when id not in (select distinct p_id from tree where p_id is not null) then 'Leaf'
else 'Inner' end as type from tree
order by 1

0 comments on commit 648b2f7

Please sign in to comment.