Sql optimise nested set new methods branch

New Method added to get the correlated query to get the path of the nodes