Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel query builder sum

$purchases = DB::table('transactions')
    ->join('categories', 'transactions.category_id', '=', 'categories.id')
    ->where('categories.kind', '=', 1)
    ->sum('transactions.amount');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #query #builder #sum
ADD COMMENT
Topic
Name
5+2 =