We have the two tables: "product" and "product_part".
One product can have many product parts, so that the product_part has id_product column that refernces a product's id column.
I would really like to create a MATERIALIZED VIEW that from this data set:
| Product | Product Part|
+-----------------------+
| Gearbox | Metal scrap |
+-----------------------+
| Gearbox | Iron scrap |
+-----------------------+
| Gearbox | Gold scrap |
+-----------------------+
Would create this output:
| Product | Parts |
+---------+------------------------------------------------+
| Gearbox | ["Metal scrap", "Iron scrap", "Gold scrap"] |
+---------+------------------------------------------------+