有时候再做SQL查询的时候,如果数据量太大,会取其中的一部分作为代表,以下SQL语句中每隔10条数据取一条,即ID 除以10余1的记录
select s.Lon,s.Lat from (select * from(select row_number() over (order by GPSTime) as rn,* from GPSPositions) t)s
where rn%10=1 and GPSTime>='2016-08-24 12:00:00' AND GPSTime<='2016-08-30'