Answers for "group by together in left join sum laravel"

SQL
0

sql select sum group by id laravel join

$users = User::select('users*', 'analytics.*', DB::raw('SUM(analytics.revenue) As revenue'))
         ->leftJoin('analytics', 'analytics.user_id', '=', 'users.id')
         ->where('analytics.date', Carbon::today()->toDateString())
         ->get();
Posted by: Guest on July-14-2020

Code answers related to "group by together in left join sum laravel"

Code answers related to "SQL"

Browse Popular Code Answers by Language