Replace inline SQL with the function to retrieve country boundaries

2 jobs for 4-use-the-function-for-retrieving-country-boundary-geometries-to-reduce-inline-sql-code in 46 seconds (queued for 1 second)