I have this table patients
patient_id | job
2 nurse
2 carpenter
1 programmer
It should count 2 because it didnt include the same id
does anyone know a query for that? I'm using laravel
and this is my code so far
App\Notification::select('patients.*',DB::raw('count(*) as total'))