I would like to understand how should a select according to my scheme look like. Since it's many to many relation, I have used binding table in the scheme.

Now, my app situation is: I want to show all repairs for a vehicle with some id. In my function, I have that id stored in a variable let's say $id so I know what vehicle I want to see all repairs so the table vehicles is not important in this case for this select that I need.
So I want to write a select for specific vehicle where repairs.vehicle_id = $id.
One repair row has to contain columns worker name and surname. Later on, I have a table for parts ready to add into repairs but it will be same scenario like with workers so I just want to understand now, how can I write such select using joins and group by and other necessary sql functions to get workers working on the repair.
Of course, in one repair, there can be more workers.
Table repair_worker would look like this:
"repair_id" , "worker_id"
"86" , "2"
"87" , "3"
"87" , "4"
"88" , "1"
"88" , "2"
I am using Laravel framework but I would like to use only RAW SQL, no laravel functions if possible.
EDIT:
$repairs = DB::select(DB::raw('
select r.id repair_id, w.name, w.surname
from repairs r
join repair_worker rw on r.id = rw.repair_id
join workers w on w.id = rw.worker_id
where r.vehicle_id = ?
group by w.name, w.surname, r.id
'),[$vehicle->id]);
If you just want the names of the workers, this should work:
select r.id repair_id, w.Name, w.SurName
from repairs r
join repair_worker rw on r.id = rw.repair_id
join workers w on w.id = rw.worker_id
where r.vehicle_id = $id
group by r.id, w.Name, w.SurName
To put the repair on a single row, with all the workers in a single column, you can do this:
select r.id repair_id, string_agg(w.Name || ' ' || w.SurName, ', ') workers
from repairs r
join repair_worker rw on r.id = rw.repair_id
join workers w on w.id = rw.worker_id
where r.vehicle_id = ?
group by r.id;