0

I have one table in vertica. Table name sub_temp. Mapping key is an identity column.Data is as follows:

 MAPPING_KEY | SUBSCRIBER_KEY | DATASOCCODE
-------------+----------------+-------------
           1 |              1 | 123
           2 |              1 | 456
      250001 |              1 | 342
           3 |              2 | 789
           4 |              2 | 000
      250002 |              2 | 42

I want the output as below :

SUBSCRIBER_KEY | DATASOCCODE
---------------+-------------
             1 | 123,456,342
             2 | 789,000,42

There can be multiple DATASOCCODE against one SUBSCRIBER_KEY . Above data is just one instance. Please suggest the approach for the above problem.

Kermit
  • 33,827
  • 13
  • 85
  • 121
Abhishek
  • 13
  • 2

0 Answers0