Only this week, get the SQL Complete Track of 9 courses in a special prize of $330$89!
Introduction
Practice
16. Exercise 15
Summary

Instruction

You're almost at the finish line now. Don't give up!

Exercise

Mark analyzes the bicycle routes in the Buena Vista district and prepares a plan for his next bicycle trip.

Show the id and course columns for each bicycle route that intersects with Buena Vista alongside the following columns related to the midpoint of each route (which must lie on the given route): latitude, longitude and coordinates as a geometry column. Order the results by midpoint longitude in ascending order. Analyze the results on the map.

Stuck? Here's a hint!

Use ST_PointOnSurface. To get the longitude of a point, use ST_X. To get the latitude, use ST_Y. Use a spatial join with ST_Intersects.