Seeking Advice for Creating Dynamic Tables with Products and Orders in Coda.io

Hello, I need a bit of help with the following project. I have a table for products and another for orders. When a customer chooses a product in the order, these products have different options. I would need a table where I can see the different products that have been purchased (each product with each option would be a different row) and have a column with the total number of each product purchased, and another column showing which orders they are and how much of each has been ordered. The table shown in the image below is the result I would expect. I can think of several methods to do this, but none seem clean. Any suggestions? Thank you very much.

Hello I propose a solution that works.
Then maybe review the architecture and workflow :wink:

Thank you very much, I really like your approach. I will study the approach and the formulas carefully since I am not accustomed to using these formulas. Thank you very much for your help.