select Datum, '____', GROUP_CONCAT(Classe, '|') from 100_c inner join 310_planning on Cid=C310 where (AS1='2122' or AS2='2122') and DAYOFWEEK(Datum)=7 and 310_planning.Local not in ('OUT','PRIS') group by Datum order by Datum, Classe