If you want to omit any duplicates, simply add distinct in the first parameter: select country, string_agg(distinct city, ',') as cities from country join ...
確定! 回上一頁