Please I am trying to run a query that looks like this in raw sql
SELECT COUNT(cntr) count, address,
description FROM resti GROUP BY cntr = HAVING count > 1
in laravel.
I have tried this
DB::table("resti")
->select(DB::raw("COUNT(cntr) count, address, description"))
->groupBy("cntr")
->havingRaw("count > 1")
->get();
But it gives of some aggregate error.