Anyone familiar with this Laravel Error:
\"SQLSTATE[42000]: Syntax error or access violation: 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with
You have to use groupBy():
groupBy()
$feedback_data = DB::table('feedback') ->select(DB::raw('office, avg(q1) as q1, avg(q2) as q2')) ->groupBy('office') ->get();