Magento 2 SQL queries › Prices and promotions
Which products have tier prices?
Short answer: Tier prices and customer group prices are both rows in catalog_product_entity_tier_price.
In the Magento admin
- Open a product and check Advanced Pricing › Customer Group Price. There's no catalogue-wide list.
With one query
These queries only read data. Run them on a copy of your database if you can, or ask your developer to. If your tables have a prefix (set in app/etc/env.php), add it to each table name.
Magento Open Source
SELECT e.sku,
IF(t.all_groups = 1, 'ALL GROUPS', g.customer_group_code) AS customer_group,
t.website_id, t.qty, t.value, t.percentage_value
FROM catalog_product_entity_tier_price t
JOIN catalog_product_entity e ON e.entity_id = t.entity_id
LEFT JOIN customer_group g ON g.customer_group_id = t.customer_group_id
ORDER BY e.sku, t.qty;
Adobe Commerce
Product, category, rule and CMS values are stored per version and joined on row_id (why):
SELECT e.sku,
IF(t.all_groups = 1, 'ALL GROUPS', g.customer_group_code) AS customer_group,
t.website_id, t.qty, t.value, t.percentage_value
FROM catalog_product_entity_tier_price t
JOIN catalog_product_entity e ON e.row_id = t.row_id
AND e.created_in <= UNIX_TIMESTAMP() AND e.updated_in > UNIX_TIMESTAMP()
LEFT JOIN customer_group g ON g.customer_group_id = t.customer_group_id
ORDER BY e.sku, t.qty;
Good to know
- A row with quantity 1 is a customer group price; higher quantities are tier prices.
percentage_valueis set when the price is a percentage discount instead of a fixed price.