Hi. collect_list should be able to achieve what you want: select id
,concat_ws(',',collect_list(location)) as location
group by id
I found the solution here: https://stackoverflow.com/questions/44770037/hive-pivot-and-sum Output should look like this: 1 Bob 08/10/1985 New Jersey,New York,North Carolina
2 John 26/11/1990 Oklahoma
Hope this helps.
... View more