在SQL中将列值转换为CSV:
rt4zxlrg1#
你需要string_agg,所以应该是this-
string_agg
SELECT sr_number, name, string_agg(city, ', ') WITHIN GROUP (ORDER BY city) AS city FROM table_name GROUP BY sr_number, name;
1条答案
按热度按时间rt4zxlrg1#
你需要
string_agg
,所以应该是this-