How to group by multiple columns in Laravel Query Builder? (ok)
https://www.itsolutionstuff.com/post/how-to-group-by-multiple-columns-in-laravel-query-builderexample.html
How to group by multiple columns in Laravel Query Builder?
$data = DB::table("items_count") ->select( 'items_count.*' ,DB::raw("SUM(items_count.quantity) as total_quantity")) ->groupBy('items_count.id_item','items_count.id_cat') ->get();print_r($data); PreviousHow to use groupby having with DB::raw in Laravel Query Builder? (ok)NextWhere condition in Laravel Relationship Example
Last updated