Skip to content

Finding attribute option value between configurable product and its simple products by sql query

Using Magento 2.4
MaySql 8

I am investing now a lot of time to try finding the option_id (red marked) of the connected simple product to the configurable products.

enter image description here

I ended up in the following tables:
catalog_product_relation -> this gives me relation from parent_id to child_id
catalog_product_super_attribute
catalog_product_super_link

following the parent id and searching for it in catalog_product_super_attribute gives me the attribute_id that corresponds to the correct attribute. So far so good.

enter image description here

But when I would like to check which simple product has the real option_value set I donĀ“t know how to go on.

The shop is currently broken down and we need to get out the products by sql and not by php or api.I am searching for the connection from these tables to option id.