Pergunta de entrevista da empresa Craftsmen

Tree Based query. Find root of a tree.