Only this week, get the SQL Complete Track of 9 courses in a special prize of $330 $89!
5. Question 4


Good. How about question number 4?


For each district, show its:

  • name,
  • centroid as a geometry,
  • point on the surface as a geometry,
  • the distance (in meters) between its centroid and its point on surface.

Sort the results by the last column in descending order.

Note: in order to get the expected results, first transform the polygons to the proper SRID (26910), find the center points, and then calculate the distance between the centroid and point on the surface.