我的查询正在运行,但是当我添加组时,它说它不在GROUP BY中,即使它在查询中,附在此处是我的代码:
$area = DB::table('area')
->join('barangays', 'barangays.id', '=', 'area.barangay_id')
->join('customers', 'customers.id', '=', 'area.customer_id')
->join('payment_terms', 'payment_terms.id', '=', 'customers.payment_term_id')
->join('salesmen', 'salesmen.id', '=', 'customers.salesman_id')
->groupBy('salesmen.id')
->get();