SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  descr1.product as product, 
  companies.company as company_name, 
  MIN(
    IF(
      prices.percentage_discount = 0, 
      prices.price, 
      prices.price - (
        prices.price * prices.percentage_discount
      )/ 100
    )
  ) as price, 
  products.product_type, 
  products.parent_product_id, 
  products.rf_stop_update_price, 
  products.rf_stop_update_amount, 
  products.rf_stop_update_status 
FROM 
  cscart_products as products 
  LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id 
  AND descr1.lang_code = 'en' 
  LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id 
  AND prices.lower_limit = 1 
  LEFT JOIN cscart_companies AS companies ON companies.company_id = products.company_id 
  INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id 
  INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id 
  AND (
    cscart_categories.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_categories.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_categories.usergroup_ids
    )
  ) 
  AND cscart_categories.status IN ('A', 'H') 
  AND cscart_categories.storefront_id IN (0, 1) 
WHERE 
  1 
  AND cscart_categories.category_id IN (7247) 
  AND companies.status IN ('A') 
  AND products.company_id IN (2, 8, 9, 10, 0) 
  AND (
    products.usergroup_ids = '' 
    OR FIND_IN_SET(0, products.usergroup_ids) 
    OR FIND_IN_SET(1, products.usergroup_ids)
  ) 
  AND products.status IN ('A') 
  AND prices.usergroup_id IN (0, 0, 1) 
  AND products.parent_product_id = 0 
  AND products.product_type != 'D' 
GROUP BY 
  products.product_id 
ORDER BY 
  price desc, 
  products.product_id ASC 
LIMIT 
  0, 96

Query time 0.00357

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "92.08"
    },
    "ordering_operation": {
      "using_filesort": true,
      "grouping_operation": {
        "using_temporary_table": true,
        "using_filesort": false,
        "nested_loop": [
          {
            "table": {
              "table_name": "cscart_categories",
              "access_type": "const",
              "possible_keys": [
                "PRIMARY",
                "c_status",
                "p_category_id"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "category_id"
              ],
              "key_length": "3",
              "ref": [
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 1,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "0.10",
                "prefix_cost": "0.00",
                "data_read_per_join": "2K"
              },
              "used_columns": [
                "category_id",
                "usergroup_ids",
                "status",
                "storefront_id"
              ]
            }
          },
          {
            "table": {
              "table_name": "companies",
              "access_type": "range",
              "possible_keys": [
                "PRIMARY"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "company_id"
              ],
              "key_length": "4",
              "rows_examined_per_scan": 5,
              "rows_produced_per_join": 1,
              "filtered": "33.33",
              "cost_info": {
                "read_cost": "2.10",
                "eval_cost": "0.17",
                "prefix_cost": "2.26",
                "data_read_per_join": "10K"
              },
              "used_columns": [
                "company_id",
                "status",
                "company"
              ],
              "attached_condition": "((`nuie_scalesta_net`.`companies`.`status` = 'A') and (`nuie_scalesta_net`.`companies`.`company_id` in (2,8,9,10,0)))"
            }
          },
          {
            "table": {
              "table_name": "products_categories",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY",
                "pt"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "category_id"
              ],
              "key_length": "3",
              "ref": [
                "const"
              ],
              "rows_examined_per_scan": 117,
              "rows_produced_per_join": 195,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "0.49",
                "eval_cost": "19.50",
                "prefix_cost": "22.25",
                "data_read_per_join": "3K"
              },
              "used_columns": [
                "product_id",
                "category_id"
              ]
            }
          },
          {
            "table": {
              "table_name": "products",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "age_verification",
                "status",
                "idx_parent_product_id",
                "my_supplier_id",
                "supplier_access_time",
                "products_rf_product_code_index",
                "products_rf_manufacturer_code_index"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "nuie_scalesta_net.products_categories.product_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 9,
              "filtered": "5.00",
              "cost_info": {
                "read_cost": "29.25",
                "eval_cost": "0.98",
                "prefix_cost": "71.00",
                "data_read_per_join": "46K"
              },
              "used_columns": [
                "product_id",
                "product_type",
                "status",
                "company_id",
                "usergroup_ids",
                "parent_product_id",
                "rf_stop_update_price",
                "rf_stop_update_amount",
                "rf_stop_update_status"
              ],
              "attached_condition": "((`nuie_scalesta_net`.`products`.`company_id` = `nuie_scalesta_net`.`companies`.`company_id`) and (`nuie_scalesta_net`.`products`.`parent_product_id` = 0) and ((`nuie_scalesta_net`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`products`.`usergroup_ids`))) and (`nuie_scalesta_net`.`products`.`status` = 'A') and (`nuie_scalesta_net`.`products`.`product_type` <> 'D'))"
            }
          },
          {
            "table": {
              "table_name": "descr1",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "product_id"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id",
                "lang_code"
              ],
              "key_length": "9",
              "ref": [
                "nuie_scalesta_net.products_categories.product_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 9,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "1.46",
                "eval_cost": "0.98",
                "prefix_cost": "73.44",
                "data_read_per_join": "37K"
              },
              "used_columns": [
                "product_id",
                "lang_code",
                "product"
              ]
            }
          },
          {
            "table": {
              "table_name": "prices",
              "access_type": "ref",
              "possible_keys": [
                "usergroup",
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "key": "usergroup",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "nuie_scalesta_net.products_categories.product_id"
              ],
              "rows_examined_per_scan": 16,
              "rows_produced_per_join": 16,
              "filtered": "9.92",
              "cost_info": {
                "read_cost": "2.48",
                "eval_cost": "1.60",
                "prefix_cost": "92.08",
                "data_read_per_join": "384"
              },
              "used_columns": [
                "product_id",
                "price",
                "percentage_discount",
                "lower_limit",
                "usergroup_id"
              ],
              "attached_condition": "((`nuie_scalesta_net`.`prices`.`lower_limit` = 1) and (`nuie_scalesta_net`.`prices`.`usergroup_id` in (0,0,1)))"
            }
          }
        ]
      }
    }
  }
}

Result

product_id product company_name price product_type parent_product_id rf_stop_update_price rf_stop_update_amount rf_stop_update_status
89173 Standard Wall Frame Roxor 290.00000000 P 0 N N N
90321 Cisterns Round Dual Flush Push Button Roxor 278.33000000 P 0 N N N
90322 Cisterns Square Dual Flush Push Button Roxor 278.33000000 P 0 N N N
90325 Ceramics Accessories Pneumatic Dual Flush Universal Access Concealed Cistern Roxor 149.17000000 P 0 N N N
90324 Ceramics Accessories Pneumatic Dual Flush Universal Access Concealed Cistern Roxor 124.17000000 P 0 N N N
90326 Ceramics Accessories Pneumatic Dual Flush Universal Access Concealed Cistern Roxor 124.17000000 P 0 N N N
90323 Ceramics Accessories Pneumatic Dual Flush Universal Access Concealed Cistern Roxor 115.83000000 P 0 N N N
90329 Universal Access Cistern & Matt Black Square Flush Plate Roxor 108.33000000 P 0 N N N
90330 Universal Access Cistern & Brushed Brass Square Flush Plate Roxor 108.33000000 P 0 N N N
90331 Ceramics Accessories Concealed Cistern & Square Push Button Roxor 108.33000000 P 0 N N N
90333 Universal Access Cistern & Matt Black Traditional Flush Plate Roxor 108.33000000 P 0 N N N
90334 Universal Access Cistern & Brushed Brass Traditional Flush Plate Roxor 108.33000000 P 0 N N N
90337 Universal Access Cistern & Matt Black Square Flush Plate Roxor 108.33000000 P 0 N N N
90338 Universal Access Cistern & Black Square Flush Plate Roxor 108.33000000 P 0 N N N
90339 Universal Access Cistern & Brushed Brass Square Flush Plate Roxor 108.33000000 P 0 N N N
90340 Universal Access Cistern & Brushed Brass Flush Plate Roxor 108.33000000 P 0 N N N
90341 Ceramics Accessories Concealed Cistern & Square Push Button Roxor 108.33000000 P 0 N N N
90342 Ceramics Accessories Dual Flush Cistern & Square Push Button Roxor 108.33000000 P 0 N N N
90345 Universal Access Cistern & Matt Black Traditional Flush Plate Roxor 108.33000000 P 0 N N N
90346 Universal Access Cistern & Matt Black Traditional Flush Plate Roxor 108.33000000 P 0 N N N
90347 Universal Access Cistern & Brushed Brass Traditional Flush Plate Roxor 108.33000000 P 0 N N N
90348 Universal Access Cistern & Brushed Brass Traditional Flush Plate Roxor 108.33000000 P 0 N N N
90328 Universal Access Cistern & Chrome Square Flush Plate Roxor 95.83000000 P 0 N N N
90332 Universal Access Cistern & Chrome Traditional Flush Plate Roxor 95.83000000 P 0 N N N
90335 Universal Access Cistern & Chrome Square Flush Plate Roxor 95.83000000 P 0 N N N
90336 Universal Access Cistern & Chrome Square Flush Plate Roxor 95.83000000 P 0 N N N
90343 Universal Access Cistern & Chrome Traditional Flush Plate Roxor 95.83000000 P 0 N N N
90344 Universal Access Cistern & Chrome Traditional Flush Plate Roxor 95.83000000 P 0 N N N
90327 Ceramics Accessories Pneumatic Dual Flush Universal Access Concealed Cistern Roxor 82.50000000 P 0 N N N
90317 Dual Flush Concealed Cistern Roxor 69.17000000 P 0 N N N
90319 Dual Flush Concealed Cistern Roxor 69.17000000 P 0 N N N
90320 Dual Flush Concealed Cistern Roxor 69.17000000 P 0 N N N
87388 Ceramics Accessories Round Flush Plate for Pneumatic Dual Flush Roxor 66.67000000 P 0 N N N
87387 Ceramics Accessories Round Flush Plate for Pneumatic Dual Flush Roxor 41.67000000 P 0 N N N
87389 Ceramics Accessories Round Flush Plate for Pneumatic Dual Flush Roxor 41.67000000 P 0 N N N
87383 Ceramics Accessories Square Dual Flush Black Push Button Roxor 39.17000000 P 0 N N N
87384 Ceramics Accessories Square Dual Flush Brushed Brass Push Button Roxor 39.17000000 P 0 N N N
89612 Dual Flush Button Roxor 39.17000000 P 0 N N N
89613 Dual Flush Button Roxor 39.17000000 P 0 N N N
87386 Ceramics Accessories Round Flush Plate for Pneumatic Dual Flush Roxor 33.33000000 P 0 N N N
87382 Ceramics Accessories Square Dual Flush Chrome Push Button Roxor 26.67000000 P 0 N N N
89611 Dual Flush Button Roxor 26.67000000 P 0 N N N
94119 XTY007R Roxor 0.00000000 P 0 N N N
94120 XTY007S Roxor 0.00000000 P 0 N N N
94121 XTY009 Roxor 0.00000000 P 0 N N N
94122 XTY009PR1 Roxor 0.00000000 P 0 N N N
94123 XTY009PR4 Roxor 0.00000000 P 0 N N N
94124 XTY009PR8 Roxor 0.00000000 P 0 N N N
94125 XTY009PS1 Roxor 0.00000000 P 0 N N N
94126 XTY009PS4 Roxor 0.00000000 P 0 N N N
94127 XTY009PS8 Roxor 0.00000000 P 0 N N N
94128 XTY107R Roxor 0.00000000 P 0 N N N
94129 XTY107S Roxor 0.00000000 P 0 N N N
94130 XTY109R Roxor 0.00000000 P 0 N N N
94131 XTY109S Roxor 0.00000000 P 0 N N N
94132 XTY407R Roxor 0.00000000 P 0 N N N
94133 XTY407S Roxor 0.00000000 P 0 N N N
94134 XTY409R Roxor 0.00000000 P 0 N N N
94135 XTY409S Roxor 0.00000000 P 0 N N N
94136 XTY807R Roxor 0.00000000 P 0 N N N
94137 XTY807S Roxor 0.00000000 P 0 N N N
94138 XTY809R Roxor 0.00000000 P 0 N N N
94139 XTY809S Roxor 0.00000000 P 0 N N N
94457 BAYA102 Roxor 0.00000000 P 0 N N N
94839 140CFH16CP Roxor 0.00000000 P 0 N N N
94840 140FH21 Roxor 0.00000000 P 0 N N N
94841 142FE0204 Roxor 0.00000000 P 0 N N N
95319 SY-TORBO6 Roxor 0.00000000 P 0 N N N
95365 140CFE08WH Roxor 0.00000000 P 0 N N N
95366 140CFE09WH Roxor 0.00000000 P 0 N N N
95367 140CFE10WH Roxor 0.00000000 P 0 N N N
95368 140CFH0800 Roxor 0.00000000 P 0 N N N
95369 140CFH0900 Roxor 0.00000000 P 0 N N N
95370 140CFH1000 Roxor 0.00000000 P 0 N N N
95371 140CFH14CP Roxor 0.00000000 P 0 N N N
95372 140CFH14DF Roxor 0.00000000 P 0 N N N
95373 140CFH15CP Roxor 0.00000000 P 0 N N N
95374 140CFH16DF Roxor 0.00000000 P 0 N N N
95375 140FH20 Roxor 0.00000000 P 0 N N N
95377 142FE5104 Roxor 0.00000000 P 0 N N N
95927 LXWHF Roxor 0.00000000 P 0 N N N
95928 LXY007 Roxor 0.00000000 P 0 N N N
95929 LXY008B Roxor 0.00000000 P 0 N N N
95930 LXY009 Roxor 0.00000000 P 0 N N N
95931 LXY011S Roxor 0.00000000 P 0 N N N
96494 140CFE08WH-P Roxor 0.00000000 P 0 N N N
96495 140CFE09WH-P Roxor 0.00000000 P 0 N N N
96496 140CFE10WH-P Roxor 0.00000000 P 0 N N N
96497 140CFH0800-P Roxor 0.00000000 P 0 N N N
96498 140CFH0900-P Roxor 0.00000000 P 0 N N N
96499 140CFH1000-P Roxor 0.00000000 P 0 N N N
96500 140CFH14CP-P Roxor 0.00000000 P 0 N N N
96501 140CFH14DF-P Roxor 0.00000000 P 0 N N N
96502 140CFH15CP-P Roxor 0.00000000 P 0 N N N
96503 140CFH16CP-P Roxor 0.00000000 P 0 N N N
96504 140CFH16DF-P Roxor 0.00000000 P 0 N N N