Part 2 SQL query to get organization hierarchy