SELECT 
    store_id,
    lng,lat, 
    ROUND(6378.138*2*ASIN(SQRT(POW(SIN((22.299439*PI()/180-lat*PI()/180)/2),2)+COS(22.299439*PI()/180)*COS(lat*PI()/180)*POW(SIN((114.173881*PI()/180-lng*PI()/180)/2),2)))*1000) AS distance
FROM 
    store_info
ORDER BY 
    distance DESC
LIMIT 100

已注销
981 声望48 粉丝

Focus on programming efficiency