Sometime for such queries you need to disable the strict check
So inside config/database.php and inside mysql,
Set 'strict' => false,
->select('user_id', DB::raw('SUM(points) as total_points'))
MyModel::where('user_id', $_some_id)->sum('amount')
$query = SalesPayment::select('*', DB::raw('SUM(amount) AS total_sale_amount')->with ....