SELECT product_id, stock_status, currency, brand_name, brand_company_id, product_name, product_image, style_number, price_min AS price, company_participates, MIN(price_min) AS min_price, MAX(price_max) AS max_price, MAX(has_ptp) AS max_has_ptp, MIN(is_dropship) AS is_dropshippable, INTERVAL(price,0,25,50,75,100,150,200,300,500,750,1000) AS price_range, ANY(x.id = 1405 FOR x IN categories) AS has_category FROM locally:product_stores_2 WHERE channel_id = 1 AND suppress_in_native_domain = false AND store_id = 21064 AND has_ptp = 1 AND has_category = 1 GROUP BY product_id, currency ORDER BY stock_status desc, popularity_rank desc LIMIT 30 OFFSET 0 OPTION threads=16, max_query_time=1 FACET store_id ORDER BY COUNT(*) DESC LIMIT 40 FACET brand_company_id ORDER BY COUNT(*) DESC LIMIT 50 FACET category_id_top ORDER BY COUNT(*) DESC LIMIT 10 FACET category_id_2nd ORDER BY COUNT(*) DESC LIMIT 10 FACET category_id_3rd ORDER BY COUNT(*) DESC LIMIT 10 FACET category_id_4th ORDER BY COUNT(*) DESC LIMIT 10 FACET price_range AS pr,currency FACET INTERVAL(avg_rating,0,1,2,3,4) ORDER BY FACET() ASC FACET gender ORDER BY COUNT(*) DESC LIMIT 20