bsp.: Multiple ID | Name 1 | Markus 1 | Sabine 1 | Daniel 1 | Thomas Ergebnis: 1 | Markus,Sabine,Daniel,Thomas,
mysql -h database -u username -e 'select from table_ where data_!="" order by data_ desc' databasename -s | perl -e 'while(<>){ @info=split(/\t/,$_); if($info[0] ne $oldinfo){ print "\n$info[0]|"; } $info[1]=~s/\n//g; printf "$info[1],"; $oldinfo=$info[0]; }';