See: https://postgis.net/workshops/postgis-intro/knn.html You gave us so much - we want more π