order by for sensorhistory corrected