Расчет цены с доставкой
SELECT MIN(t.absolute_price) AS `min`, MAX(t.absolute_price) AS `max` FROM (SELECT IF (`shop_items`.`shop_currency_id` = '3', IF (shop_discounts.value, IF(shop_discounts.type, price * 53 - shop_discounts.value, price * (100 - shop_discounts.value) * 53 / 100), shop_items.price * 53), IF (`shop_items`.`shop_currency_id` = '2', IF (shop_discounts.value, IF(shop_discounts.type, price * 60 - shop_discounts.value, price * (100 - shop_discounts.value) * 60 / 100), shop_items.price * 60), IF (`shop_items`.`shop_currency_id` = '1', IF (shop_discounts.value, IF(shop_discounts.type, price * 1 - shop_discounts.value, price * (100 - shop_discounts.value) * 1 / 100), shop_items.price * 1), price))) AS `absolute_price` FROM `shop_items` LEFT OUTER JOIN `shop_item_discounts` ON `shop_items`.`id` = `shop_item_discounts`.`shop_item_id` LEFT OUTER JOIN `shop_discounts` ON `shop_item_discounts`.`shop_discount_id` = `shop_discounts`.`id` AND ( `shop_discounts`.`end_datetime` >= '2019-05-25 11:08:28' OR `shop_discounts`.`end_datetime` = '0000-00-00 00:00:00' AND `shop_discounts`.`start_datetime` <= '2019-05-25 11:08:28' ) WHERE `price` > 0 GROUP BY `shop_items`.`id`) AS `t`

Желтый с разводом камень

Выбор параметров
Интересные статьи
SELECT MIN(price) AS `min`, MAX(price) AS `max` FROM (SELECT `shop_items`.* FROM `shop_items` LEFT OUTER JOIN `shop_item_properties` ON `shop_items`.`shop_id` = `shop_item_properties`.`shop_id` LEFT OUTER JOIN `property_value_strings` ON `shop_items`.`id` = `property_value_strings`.`entity_id` AND `shop_item_properties`.`property_id` = property_value_strings.property_id WHERE `shop_items`.`shop_id` = '3' AND ( `shop_items`.`start_datetime` < '2019-05-25 11:08:27' OR `shop_items`.`start_datetime` = '0000-00-00 00:00:00' ) AND ( `shop_items`.`end_datetime` > '2019-05-25 11:08:27' OR `shop_items`.`end_datetime` = '0000-00-00 00:00:00' ) AND `shop_items`.`siteuser_group_id` IN (0, -1) AND ( `shop_item_properties`.`property_id` = '69' AND `property_value_strings`.`value` = 'Желтый с разводом' ) AND `shop_items`.`active` = 1 AND ( `shop_items`.`shop_group_id` = 0 AND `shop_items`.`modification_id` = 0 ) AND `shop_items`.`deleted` = 0 GROUP BY `shop_items`.`id` ORDER BY `shop_items`.`name` ASC LIMIT 1000000 OFFSET 0) AS `t`Array ( [id] => 241 [shortcut_id] => 0 [shop_tax_id] => 0 [shop_seller_id] => 0 [shop_group_id] => 0 [shop_currency_id] => 1 [shop_id] => 3 [shop_producer_id] => 0 [shop_measure_id] => 0 [type] => 0 [name] => Песчаник желтый с разводом 15-30 мм [marking] => [vendorcode] => [description] =>

Песчаник желтый с разводами — это красивый, прочный и долговечный природный декоративно-отделочный материал для цоколей, фасадов и мощения дорожек. Выглядит он солидно и оригинально, не теряет свои свойства, не боится внешних воздействий, но при этом недорогой.

[text] => [image_large] => item_241.jpg [image_small] => small_item_241.jpg [weight] => 0.00 [price] => 370.00 [active] => 1 [siteuser_group_id] => -1 [sorting] => 0 [path] => peschanik-zheltyj-s-razvodom-15-30-mm [seo_title] => [seo_description] => [seo_keywords] => [indexing] => 1 [image_small_height] => 195 [image_small_width] => 260 [image_large_height] => 600 [image_large_width] => 800 [yandex_market] => 1 [yandex_market_bid] => 0 [yandex_market_cid] => 0 [manufacturer_warranty] => 0 [country_of_origin] => [yandex_market_sales_notes] => [user_id] => 19 [siteuser_id] => 0 [datetime] => 2018-05-18 15:13:36 [modification_id] => 0 [guid] => 934B8CA8-46AD-95E0-F978-3DE492B511F3 [start_datetime] => 0000-00-00 00:00:00 [end_datetime] => 0000-00-00 00:00:00 [showed] => 13975 [length] => 0.00 [width] => 0.00 [height] => 0.00 [apply_purchase_discount] => 1 [delivery] => 1 [pickup] => 1 [store] => 0 [adult] => 0 [deleted] => 0 )