This error came up after moving the whole source to the 5.3 version, and I\'m scratching my head for over two hours now.
So I have this kind of eloquent query:
Try using group by clause on distance field.
POI::select('*', DB::raw("SQRT( POW((x - {$this->x}),2) + POW((y - {$this->y}),2) ) AS distance"))
->where('status', Config::get('app.poi_state.enabled'))
->whereNotIn('id', $excludePOIList)
->groupBy('distance')
->having('distance', '<=', $distance)
->orderBy('distance')->get();