I'm using Postgresql and have the following code:
$items = Element::select(DB::raw("COUNT(1), category"))->groupBy('category')->get();
Mysql processes this query without any problems, but in case of Postgresql I'm getting an error:
column "id" must appear in the GROUP BY clause or be used in an aggregate function
That's because your package adds extra select elements.* and Postgresql works in such way, that I need to specify, what to do with each selected field.