Thời trang
SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `stock`.`qty` FROM `catalog_product_entity` AS `e`
INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '64'
INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
INNER JOIN `catalog_product_index_eav` AS `color_idx` ON color_idx.entity_id = e.entity_id AND color_idx.attribute_id = '92' AND color_idx.store_id = 1 AND color_idx.value = '144'
INNER JOIN `catalog_product_index_eav` AS `qtt_doi_tuong_idx` ON qtt_doi_tuong_idx.entity_id = e.entity_id AND qtt_doi_tuong_idx.attribute_id = '180' AND qtt_doi_tuong_idx.store_id = 1 AND qtt_doi_tuong_idx.value = '87'
INNER JOIN `catalog_product_index_eav` AS `qtt_lua_tuoi_idx` ON qtt_lua_tuoi_idx.entity_id = e.entity_id AND qtt_lua_tuoi_idx.attribute_id = '186' AND qtt_lua_tuoi_idx.store_id = 1 AND qtt_lua_tuoi_idx.value = '157'
INNER JOIN `catalog_product_index_eav` AS `qtt_menh_hop_idx` ON qtt_menh_hop_idx.entity_id = e.entity_id AND qtt_menh_hop_idx.attribute_id = '249' AND qtt_menh_hop_idx.store_id = 1 AND qtt_menh_hop_idx.value = '541'
INNER JOIN `cataloginventory_stock_status` AS `stock` ON e.entity_id = stock.product_id WHERE (price_index.min_price >= -0.005000) AND (price_index.min_price < 199999.995000) ORDER BY `stock`.`stock_status` desc, `e`.`created_at` desc LIMIT 36