Binary Tree Nodes | SQL Advanced Select | HackerRank Solution