elastic 6.5.4
SELECT vehicleid,sum(distance) as distance,sum(duration) as duration where beginTime >= 20181201 and endTime < 20190101 FROM dw_vehicle_mileage3 group by vehicleid order by distance
error:Cannot order by non-grouped column [distance], expected [vehicleid]"}