sql 지도 위경도(latitude, longitude) 최근접 row 찾기
SELECT *, SQRT( POW( ( (69.1/1.61) * ('37.5333131' - A.centerLat)), 2) + POW(( (53/1.61) * ('127.0862168' - A.centerLng)), 2)) AS distance FROM ( select max(centerLat) as centerLat, max(centerLng) as centerLng from rectId group by groupIdx ) A WHERE centerLat > '37.5333131' - 10 / (69.1/1.61) AND centerlat '127.0862168' - 10 / (53/1.61) AND cente..
프로그래밍/DB
2021. 4. 10. 20:53