>
> select r.rtid, concat(r.rcid::text || ' on ' || l.lnumber::text) as
task
> from rides r, loco_dets l where r.rlid = l.lid group by rtid;
>
Looks like another implicit FROM clause mystery.
Try
... GROUP BY r.rtid ;
The same goes for the JOIN.
Regards, Christoph