AI Reports

Guides › Database reference › Products and attributes

Magento 2 catalog_product_entity_decimal table

Decimal product values: price, special_price, cost, weight and other decimal attributes.

Key columns

ColumnWhat it means
attribute_idWhich attribute, linking to eav_attribute.
store_id0 = default. Prices are usually stored only at 0 unless your catalog price scope is set to Website.
entity_id (Open Source) / row_id (Adobe Commerce)The product, or on Adobe Commerce the product version.
valueThe number, with up to 6 decimals.

Good to know

Example: Products with a price of 0

Magento Open Source

SELECT e.sku, e.type_id, p.value AS price
FROM catalog_product_entity e
JOIN eav_attribute a ON a.attribute_code = 'price'
JOIN eav_entity_type t ON t.entity_type_id = a.entity_type_id AND t.entity_type_code = 'catalog_product'
JOIN catalog_product_entity_decimal p ON p.entity_id = e.entity_id AND p.attribute_id = a.attribute_id AND p.store_id = 0
WHERE p.value = 0
ORDER BY e.sku;

Adobe Commerce

SELECT e.sku, e.type_id, p.value AS price
FROM catalog_product_entity e
JOIN eav_attribute a ON a.attribute_code = 'price'
JOIN eav_entity_type t ON t.entity_type_id = a.entity_type_id AND t.entity_type_code = 'catalog_product'
JOIN catalog_product_entity_decimal p ON p.row_id = e.row_id AND p.attribute_id = a.attribute_id AND p.store_id = 0
WHERE p.value = 0
  AND e.created_in <= UNIX_TIMESTAMP() AND e.updated_in > UNIX_TIMESTAMP()
ORDER BY e.sku;

Tested on Magento Open Source and Adobe Commerce 2.4.8. Read-only. If your tables have a prefix, add it to each table name.

Extra columns on Adobe Commerce

Adobe Commerce has 5 columns here instead of 5. The extra ones come from these Commerce features:

On Adobe Commerce, entity_id is replaced by row_id, which points at a product version (catalog_product_entity.row_id).

Foreign keys

All 5 columns (Magento Open Source)

Show all columns
ColumnTypeCan be emptyMagento's description
value_idint(11)Value ID
attribute_idsmallint(5) unsignedAttribute ID
store_idsmallint(5) unsignedStore ID
entity_idint(10) unsignedEntity ID
valuedecimal(20,6)yesValue

Related tables

Gaurav Harsh

Gaurav Harsh is a Magento developer who works on large Adobe Commerce stores and builds AI Reports, a Magento extension for asking your store's data questions in plain English. LinkedIn