Postgresql Group By Concatenate Strings In Java