SELECT o.*, ROUND( 6378.138 * 2 * ASIN( SQRT( POW( SIN( ( 30.768011111 * PI() / 180 - o.latitude * PI() / 180 ) / 2 ), 2 ) + COS(30.768011111 * PI() / 180) * COS(o.latitude * PI() / 180) * POW( SIN( ( 120.182130556 * PI() / 180 - o.longitude * PI() / 180 ) / 2 ), 2 ) ) ) * 1000 ) AS juli FROM gis_video_surveillance o ORDER BY juli ASC