I need some help with a problem on an IBM Informix 12.10. database.
CREATE TABLE toys(product VARCHAR(255), colour VARCHAR(255));
INSERT INTO toys (product, colour)
VALUES ('balloon', 'red'),
('balloon', 'white'),
('balloon', 'green'),
('balloon', 'yellow'),
('rubber duck', 'yellow'),
('rubber duck', 'white');
I tried STUFF, GROUP_CONCAT and LISTAGG.
Initial table: "toys"
product | colour
-----------------------
balloon | red
balloon | green
balloon | white
balloon | yellow
rubber duck | yellow
rubber duck | white
The resulting table should look like the this:
product | colours
-----------------------
balloon | red, green, white, yellow
rubber duck | yellow, white
Thank you very much for your help!