Check out example codes for "postgresql combine values in one field". It will help you in understanding the concepts better.

Code Example 1

SELECT movie, string_agg(actor, ', ') AS actor_list
FROM   tbl
GROUP  BY 1;

Learn ReactJs, React Native from akashmittal.com