I have a list of merchants that do business in different states.
Merch State
A NC
A FL
B CA
B VA
Instead of returning four records I want to group by Merch but concatenate the strings of the states so that the output looks like
Merch States
A NC,FL
B CA,VA
I'm having a lot of trouble translating the response in this answer for my issue Optimal way to concatenate/aggregate strings
I also cannot get String_agg to work, I'm not sure it works in Teradata. https://learn.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql