We have market information and respective zip codes associated with the market. Some markets have a single zip code associated with them and some have multiple.
We should try to generate the output file with Market Name separated with zip codes with a pipe and depending on the total number of zip codes, zip codes should be comma separated,
Sample Data Set:
Market_Name | Zipcode
Visakhapatnam 23456 --Case1 Data Set
Visakhapatnam 23457
Pune 12345
Mumbai 31234
Mumbai 31235
Mumbai 31236 --Case2 Data Set
Goa 16543 --Case3 Data Set
Expected Output:
Visakhapatnam|23456, 23457
Pune|12345
Mumbai|31234, 31235, 31236
Goa|16543