Skip to content

Instantly share code, notes, and snippets.

@lucasqm
Created October 4, 2018 18:27
Show Gist options
  • Save lucasqm/57ea559e3dea655886b4405cfa4142f0 to your computer and use it in GitHub Desktop.
Save lucasqm/57ea559e3dea655886b4405cfa4142f0 to your computer and use it in GitHub Desktop.
Índice de preço por categoria - Magento 2
SELECT
`i`.entity_id,
`i`.price,
`i`.final_price,
`i`.min_price,
`i`.max_price
FROM
`catalog_product_index_price` AS `i`
INNER JOIN `catalog_category_product_index` AS `cat_index` ON
cat_index.product_id = i.entity_id
AND cat_index.store_id = 1
AND cat_index.visibility IN( 2,
4 )
AND cat_index.category_id = '51';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment