Compute shortest path between two tree nodes | Snowflake