Postgresql Group By Concatenate Python Strings