title: String_agg for multiple columns
body: <p>I have the following select</p>
  
  <pre><code>$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-&gt;id]);
  </code></pre>
  
  <p>and I am trying to get <code>w.name</code> and <code>w.surname</code> into one field, separated by a comma for example. There is a function <code>string_agg(column, ',')</code> but I am having no luck to get it working. I always get syntax error. </p>
  
  <p>My try:</p>
  
  <pre><code>$repairs = DB::select(DB::raw('
                  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
            '),[$vehicle-&gt;id]);
  </code></pre>
  
  <p>How would you do it?</p>
  
  <p>I am using the newest Postgresql  9+</p>