Introduction
ST_Equals
Relationships Between Geometries
ST_Distance and ST_Dwithin
17. ST_DWithin together with ST_Distance
Spatial joins practice
Summary

Instruction

Excellent! Here's one more exercise for you.

Exercise

For restaurants with rating above 4.0, show the food_type, name, rating and distance (in meters - name the column distance) from Snooze Resort (id = 208). Show only those restaurants that are less than 10 kilometers away. Order the results by distance in ascending order.

Stuck? Here's a hint!

You will have to use the ST_Distance function in the SELECT clause.

Console

Code editor

Result

TableConsole