SELECT 1 AS `status`, `e`.`entity_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`created_at`, `e`.`updated_at`, `e`.`sku`, `cat_index`.`position` AS `cat_index_position`, `perm`.`grant_catalog_category_view`, `perm`.`grant_catalog_product_price`, `perm`.`grant_checkout_items`, `e`.`name`, `e`.`short_description`, `e`.`price`, `e`.`special_price`, `e`.`special_from_date`, `e`.`special_to_date`, `e`.`weight`, `e`.`manufacturer`, `e`.`manufacturer_value`, `e`.`image`, `e`.`small_image`, `e`.`thumbnail`, `e`.`color`, `e`.`color_value`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`required_options`, `e`.`image_label`, `e`.`small_image_label`, `e`.`thumbnail_label`, `e`.`url_key`, `e`.`msrp`, `e`.`msrp_display_actual_price_type`, `e`.`price_type`, `e`.`weight_type`, `e`.`price_view`, `e`.`links_purchased_separately`, `e`.`links_exist`, `e`.`swatch_image`, `e`.`tax_class_id`, `e`.`objem`, `e`.`objem_value`, `e`.`heureka_name`, `e`.`long_term_unavailable`, `e`.`ean`, `e`.`velkost_oblecenia`, `e`.`velkost_oblecenia_value`, `e`.`sw_featured`, `e`.`giftcard_amounts`, `e`.`allow_open_amount`, `e`.`open_amount_min`, `e`.`open_amount_max`, `e`.`top_in_category`, `e`.`product_sort_coefficient`, `e`.`ts_dimensions_length`, `e`.`ts_dimensions_width`, `e`.`ts_dimensions_height`, `e`.`amxnotif_hide_alert`, `e`.`fb_promo_image`, `e`.`standard_price`, `e`.`netto_weight`, `e`.`expected_arrival_date`, `e`.`flavor`, `e`.`flavor_value`, `e`.`mass_grams_g`, `e`.`mass_grams_g_value`, `e`.`mass_mililiter_ml`, `e`.`mass_mililiter_ml_value`, `e`.`tablets`, `e`.`tablets_value`, `e`.`capsules`, `e`.`capsules_value`, `e`.`size_of_clothing`, `e`.`size_of_clothing_value`, `e`.`material`, `e`.`material_value`, `e`.`colors`, `e`.`colors_value`, `e`.`mininum_order_quantity`, `e`.`number_of_pieces_per_pallette`, `e`.`maximum_duration`, `e`.`number_of_pieces_per_package_o`, `e`.`form`, `e`.`form_value`, `e`.`blend`, `e`.`blend_value`, `e`.`vegetarian`, `e`.`vegetarian_value`, `e`.`vegan`, `e`.`vegan_value`, `e`.`glutenfree`, `e`.`glutenfree_value`, `e`.`lactosefree`, `e`.`lactosefree_value`, `e`.`bio`, `e`.`bio_value`, `e`.`protein_sourcee`, `e`.`protein_sourcee_value`, `e`.`method_of_protein_processing`, `e`.`method_of_protein_processing_value`, `e`.`gmo_free`, `e`.`gmo_free_value`, `e`.`artificial_sweetener_free`, `e`.`artificial_sweetener_free_value`, `e`.`plastic_packaging_free`, `e`.`plastic_packaging_free_value`, `e`.`aspartame_free`, `e`.`aspartame_free_value`, `e`.`protein_content_in_product`, `e`.`carbohydrates`, `e`.`number_of_pieces_per_batch`, `e`.`legal_category_of_product`, `e`.`legal_category_of_product_value`, `e`.`purchasing_category`, `e`.`purchasing_category_value`, `e`.`fitness_goal`, `e`.`gender_segmentation`, `e`.`emkp_visible`, `e`.`supplier_internal_code`, `e`.`product_labels`, `e`.`dutiable`, `e`.`fitness_guide_description`, `e`.`is_subscription`, `e`.`subscription_type`, `e`.`discount_type`, `e`.`discount_amount`, `e`.`initial_amount`, `e`.`billing_period_type`, `e`.`billing_period`, `e`.`billing_max_cycles`, `e`.`define_start_from`, `e`.`day_of_month`, `e`.`allow_trial`, `e`.`flavor_group`, `e`.`flavor_group_value`, `e`.`allergen_gluten`, `e`.`allergen_gluten_value`, `e`.`allergen_crustaceans`, `e`.`allergen_crustaceans_value`, `e`.`allergen_eggs`, `e`.`allergen_eggs_value`, `e`.`allergen_fish`, `e`.`allergen_fish_value`, `e`.`allergen_peanuts`, `e`.`allergen_peanuts_value`, `e`.`allergen_soya`, `e`.`allergen_soya_value`, `e`.`allergen_milk`, `e`.`allergen_milk_value`, `e`.`allergen_tree_nuts`, `e`.`allergen_tree_nuts_value`, `e`.`allergen_celery`, `e`.`allergen_celery_value`, `e`.`allergen_mustard`, `e`.`allergen_mustard_value`, `e`.`allergen_sesame`, `e`.`allergen_sesame_value`, `e`.`allergen_sulphites`, `e`.`allergen_sulphites_value`, `e`.`allergen_lupin`, `e`.`allergen_lupin_value`, `e`.`allergen_molluscs`, `e`.`allergen_molluscs_value`, `e`.`local_vat`, `e`.`bulk_options`, `e`.`available_for_sdd`, `e`.`available_for_sdd_value`, `e`.`milimeter_mm`, `e`.`milimeter_mm_value`, `e`.`weight_kilograms_kg`, `e`.`weight_kilograms_kg_value`, `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_status_index`.`stock_status` AS `is_salable`, `e`.`product_sort_coefficient`, (at_bestsellers.sales_ordered * IFNULL(product_sort_coefficient, 1)) AS `top_bestseller`, `e`.`top_in_category`, `at_bestsellers`.`qty_ordered` AS `bestsellers`, `product_entity`.`row_id`, `shared_product`.`customer_group_id` FROM `catalog_product_flat_3` AS `e` INNER JOIN `catalog_category_product_index_store3` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=3 AND cat_index.visibility IN(2, 4) AND cat_index.category_id='1849' LEFT JOIN `magento_catalogpermissions_index` AS `perm` ON perm.customer_group_id = 0 AND perm.category_id = cat_index.category_id AND perm.website_id = '3' INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '3' AND price_index.customer_group_id = 0 LEFT JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 LEFT JOIN `amasty_sorting_bestsellers` AS `at_bestsellers` ON (at_bestsellers.`product_id`=e.entity_id) AND (at_bestsellers.store_id = '3') INNER JOIN `search_tmp_6094402d4871c5_52642970` AS `search_result` ON e.entity_id = search_result.entity_id INNER JOIN `catalog_product_entity` AS `product_entity` ON product_entity.entity_id = e.entity_id AND (product_entity.created_in <= '1619783570' AND product_entity.updated_in > '1619783570') INNER JOIN `shared_catalog_product_item` AS `shared_product` ON (shared_product.sku =e.sku) AND (shared_product.customer_group_id = '0') WHERE (perm.grant_catalog_category_view != -2 OR perm.grant_catalog_category_view IS NULL) ORDER BY `stock_status_index`.`stock_status` DESC, `stock_status_index`.`stock_status` DESC, `stock_status_index`.`stock_status` DESC, `stock_status_index`.`stock_status` DESC, `e`.`top_in_category` desc, `top_bestseller` DESC, `e`.`top_in_category` DESC, `at_bestsellers`.`qty_ordered` DESC, `e`.`entity_id` DESC, `e`.`top_in_category` DESC, `at_bestsellers`.`qty_ordered` DESC, `e`.`entity_id` DESC LIMIT 30