What's a good way to concat a column based on a match with another column in MySQL? And possible add a limit?
Say my table looks like this:
City | State | Stores
----------------------
Miami FL Walmart
Miami FL Sams
Miami FL Target
Tampa FL Sears
Tampa FL Walgreens
And I want to get something like this:
City | State | Stores
----------------------
Miami FL Walmart, Sams, Target
Tampa FL Sears, Walgreens
Also, is it possible to set a limit on how many are concated? Say I want a limit of 2, in the above sample it would exclude Target after getting 2 items. Is this possible?