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 (7254) 
  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 
  192, 96

Query time 0.02486

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "731.64"
    },
    "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": 954,
              "rows_produced_per_join": 1590,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "1.00",
                "eval_cost": "159.00",
                "prefix_cost": "162.26",
                "data_read_per_join": "24K"
              },
              "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": 79,
              "filtered": "5.00",
              "cost_info": {
                "read_cost": "238.50",
                "eval_cost": "7.95",
                "prefix_cost": "559.76",
                "data_read_per_join": "381K"
              },
              "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": 79,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "11.93",
                "eval_cost": "7.95",
                "prefix_cost": "579.64",
                "data_read_per_join": "303K"
              },
              "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": 130,
              "filtered": "9.92",
              "cost_info": {
                "read_cost": "20.24",
                "eval_cost": "13.08",
                "prefix_cost": "731.64",
                "data_read_per_join": "3K"
              },
              "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
91667 Sorpressa Compact Round Freestanding Bath 1510mm x 760mm - No Waste Roxor 2731.67000000 P 0 N N N
91669 Divita Compact Square Freestanding Bath 1495mm x 720mm - No Waste Roxor 2731.67000000 P 0 N N N
91670 Divita Compact Square Freestanding Bath 1495mm x 720mm - No Waste Roxor 2731.67000000 P 0 N N N
91671 Divita Compact Square Freestanding Bath 1495mm x 720mm - No Waste Roxor 2731.67000000 P 0 N N N
91672 Divita Compact Square Freestanding Bath 1495mm x 720mm - No Waste Roxor 2731.67000000 P 0 N N N
91673 Divita Compact Square Freestanding Bath 1495mm x 720mm - No Waste Roxor 2731.67000000 P 0 N N N
91674 Divita Compact Square Freestanding Bath 1495mm x 720mm - No Waste Roxor 2731.67000000 P 0 N N N
91675 Divita Compact Square Freestanding Bath 1495mm x 720mm - No Waste Roxor 2731.67000000 P 0 N N N
91676 Divita Compact Square Freestanding Bath 1495mm x 720mm - No Waste Roxor 2731.67000000 P 0 N N N
91677 Divita Compact Square Freestanding Bath 1495mm x 720mm - No Waste Roxor 2731.67000000 P 0 N N N
91699 Essex Round Freestanding Bath with Leg Stand 1510mm x 760mm - No Waste Roxor 2731.67000000 P 0 N N N
91648 Esseta Compact Oval Freestanding Bath 1510mm x 760mm - No Waste Roxor 2571.67000000 P 0 N N N
91658 Sorpressa Compact Round Freestanding Bath 1510mm x 760mm - No Waste Roxor 2571.67000000 P 0 N N N
91668 Divita Compact Square Freestanding Bath 1495mm x 720mm - No Waste Roxor 2571.67000000 P 0 N N N
91772 Boat Freestanding Double Ended Acrylic Boat Bath with Aluminium Plinth - 1800mm Roxor 2331.67000000 P 0 N N N
91771 Boat Freestanding Double Ended Acrylic Boat Bath with Aluminium Plinth - 1700mm Roxor 2260.00000000 P 0 N N N
91770 Boat Freestanding Double Ended Acrylic Boat Bath with Aluminium Plinth - 1580mm Roxor 2190.00000000 P 0 N N N
83923 Murali Square Back To Wall Bath 1720mm x 740mm Roxor 2142.50000000 P 0 N N N
83930 Ancora Round Back To Wall Bath - 1640mm x 590mm Roxor 1960.00000000 P 0 N N N
83927 Slipper Freestanding Slipper Bath - 1700mm Roxor 1938.33000000 P 0 N N N
91765 Slipper Freestanding Slipper Bath - Sanded - 1700mm Roxor 1938.33000000 P 0 N N N
83934 Industrial Freestanding Industrial Boat Bath - 1710mm Roxor 1905.83000000 P 0 N N N
91766 Industrial Freestanding Industrial Boat Bath - Sanded - 1710mm Roxor 1905.83000000 P 0 N N N
83919 Chalice Major Freestanding Oval Bath with Tap Ledge 1780mm x 935mm Roxor 1898.33000000 P 0 N N N
83937 Boat Freestanding Double Ended Acrylic Boat Bath - 1800mm Roxor 1838.33000000 P 0 N N N
91769 Boat Freestanding Double Ended Acrylic Boat Bath - Sanded - 1800mm Roxor 1838.33000000 P 0 N N N
83936 Boat Freestanding Double Ended Acrylic Boat Bath - 1700mm Roxor 1776.67000000 P 0 N N N
91768 Boat Freestanding Double Ended Acrylic Boat Bath - Sanded - 1700mm Roxor 1776.67000000 P 0 N N N
83935 Boat Freestanding Double Ended Acrylic Boat Bath - 1580mm Roxor 1716.67000000 P 0 N N N
91767 Boat Freestanding Double Ended Acrylic Boat Bath - Sanded - 1580mm Roxor 1716.67000000 P 0 N N N
83918 Dinkee Compact Curved Bath Waste Included - 1500mm x 780mm Roxor 1693.33000000 P 0 N N N
83914 Tamorina Freestanding Egg Shaped Bath Tub - 1700mm x 800mm Roxor 1655.00000000 P 0 N N N
83917 Viado Round Freestanding Bath Waste Included - 1780mm x 740mm Roxor 1655.00000000 P 0 N N N
83920 Chalice Major Freestanding Oval Bath 1650mm x 900mm Roxor 1655.00000000 P 0 N N N
83922 Ovali Freestanding Oval with Waste 1805mm x 850mm Roxor 1655.00000000 P 0 N N N
83926 Ancora Square Back To Wall Bath Waste Included - 1700mm x 590mm Roxor 1655.00000000 P 0 N N N
83928 Slipp Freestanding Slipper Bath with Waste - 1590mm x 675mm Roxor 1655.00000000 P 0 N N N
83929 Plazia Double Ended Freestanding Oval Bath with Waste - 1780mm x 800mm Roxor 1655.00000000 P 0 N N N
91836 Penny 1360mm Slipper Bath - White Roxor 1655.00000000 P 0 N N N
83931 Ancorner Single Ended Corner Shower Bath - Right Handed - 1700mm x 750mm Roxor 1622.50000000 P 0 N N N
83932 Ancora Single Ended Corner Shower Bath - Left Handed - 1700mm x 750mm Roxor 1622.50000000 P 0 N N N
83916 Viado Round Freestanding Bath Waste Included - 1680mm x 740mm Roxor 1606.67000000 P 0 N N N
83925 Ancora Square Back To Wall Bath Waste Included - 1600mm x 590mm Roxor 1606.67000000 P 0 N N N
83913 Tamorina Freestanding Egg Shaped Bath Tub - 1600mm x 800mm Roxor 1582.50000000 P 0 N N N
83921 Ovali Freestanding Oval with Waste 1690mm x 800mm Roxor 1582.50000000 P 0 N N N
83933 Tamorina Freestanding Petite Bath Tub with Waste - 1400mm Roxor 1572.50000000 P 0 N N N
83915 Viado Round Freestanding Bath Waste Included - 1580mm x 740mm Roxor 1570.83000000 P 0 N N N
83924 Ancora Square Back To Wall Bath Waste Included - 1500mm x 590mm Roxor 1570.83000000 P 0 N N N
89118 Back to Wall Double Ended Freestanding Bath - Pride Leg Set 1700mm Roxor 1535.83000000 P 0 N N N
89119 Back to Wall Double Ended Freestanding Bath - Deacon Leg Set 1700mm Roxor 1535.83000000 P 0 N N N
89120 Back to Wall Double Ended Freestanding Bath - Corbel Leg Set 1700mm Roxor 1535.83000000 P 0 N N N
89150 Single Ended Freestanding Shower Bath - Pride Leg Set 1500mm Roxor 1479.17000000 P 0 N N N
89151 Single Ended Freestanding Shower Bath - Deacon Leg Set 1500mm Roxor 1479.17000000 P 0 N N N
89152 Single Ended Freestanding Shower Bath - Corbel Leg Set 1500mm Roxor 1479.17000000 P 0 N N N
89154 Single Ended Freestanding Shower Bath - Pride Leg Set 1700mm Roxor 1479.17000000 P 0 N N N
89155 Single Ended Freestanding Shower Bath - Deacon Leg Set 1700mm Roxor 1479.17000000 P 0 N N N
89156 Single Ended Freestanding Shower Bath - Corbel Leg Set 1700mm Roxor 1479.17000000 P 0 N N N
89130 Single Ended Freestanding Slipper Bath - Pride Leg Set 1500mm Roxor 1222.50000000 P 0 N N N
89131 Single Ended Freestanding Slipper Bath - Deacon Leg Set 1500mm Roxor 1222.50000000 P 0 N N N
89132 Single Ended Freestanding Slipper Bath - Corbel Leg Set 1500mm Roxor 1222.50000000 P 0 N N N
89134 Double Ended Freestanding Bath - Pride Leg Set 1500mm Roxor 1222.50000000 P 0 N N N
89135 Double Ended Freestanding Bath - Deacon Leg Set 1500mm Roxor 1222.50000000 P 0 N N N
89136 Double Ended Freestanding Bath - Corbel Leg Set 1500mm Roxor 1222.50000000 P 0 N N N
89138 Single Ended Freestanding Slipper Bath - Pride Leg Set 1700mm Roxor 1222.50000000 P 0 N N N
89139 Single Ended Freestanding Slipper Bath - Deacon Leg Set 1700mm Roxor 1222.50000000 P 0 N N N
89140 Single Ended Freestanding Slipper Bath - Corbel Leg Set 1700mm Roxor 1222.50000000 P 0 N N N
89142 Double Ended Freestanding Bath - Pride Leg Set 1700mm Roxor 1222.50000000 P 0 N N N
89143 Double Ended Freestanding Bath - Deacon Leg Set 1700mm Roxor 1222.50000000 P 0 N N N
89144 Double Ended Freestanding Bath - Corbel Leg Set 1700mm Roxor 1222.50000000 P 0 N N N
89146 Single Ended Freestanding Bath - Pride Leg Set 1700mm Roxor 1222.50000000 P 0 N N N
89147 Single Ended Freestanding Bath - Deacon Leg Set 1700mm Roxor 1222.50000000 P 0 N N N
89148 Single Ended Freestanding Bath - Corbel Leg Set 1700mm Roxor 1222.50000000 P 0 N N N
91785 Tye Single Ended Shower Bath with Feet Set 1 - 1700mm Roxor 1215.00000000 P 0 N N N
91786 Tye Single Ended Shower Bath with Feet Set 2 - 1700mm Roxor 1215.00000000 P 0 N N N
91773 Fordham Freestanding Acrylic Slipper Bath with Feet Set 1 - 1500mm Roxor 1138.33000000 P 0 N N N
91775 Fordham Freestanding Acrylic Slipper Bath with Feet Set 2 - 1500mm Roxor 1138.33000000 P 0 N N N
91781 Tye Single Ended Shower Bath with Feet Set 1 - 1500mm Roxor 1110.83000000 P 0 N N N
91782 Tye Single Ended Shower Bath with Feet Set 2 - 1500mm Roxor 1110.83000000 P 0 N N N
91774 Fordham Freestanding Acrylic Slipper Bath with Feet Set 1 - 1700mm Roxor 1106.67000000 P 0 N N N
91776 Fordham Freestanding Acrylic Slipper Bath with Feet Set 2 - 1700mm Roxor 1106.67000000 P 0 N N N
91778 Elmstead Freestanding Double Ended Slipper Bath with Feet Set 1 - 1700mm Roxor 1095.83000000 P 0 N N N
91780 Elmstead Freestanding Double Ended Slipper Bath with Feet Set 2 - 1700mm Roxor 1095.83000000 P 0 N N N
92526 Freestanding Single Ended Slipper Bath Tub, 1550mm x 750mm Roxor 1082.50000000 P 0 N N N
91783 Mistley Single Ended Roll Top Bath With Feet Set 1 - 1700mm Roxor 1079.17000000 P 0 N N N
91784 Mistley Single Ended Roll Top Bath With Feet Set 2 - 1700mm Roxor 1079.17000000 P 0 N N N
91777 Elmstead Freestanding Double Ended Slipper Bath with Feet Set 1 - 1500mm Roxor 1027.50000000 P 0 N N N
91779 Elmstead Freestanding Double Ended Slipper Bath with Feet Set 2 - 1500mm Roxor 1027.50000000 P 0 N N N
92525 Freestanding Double Ended Boat Bath Tub, 1550mm x 750mm Roxor 1015.83000000 P 0 N N N
92524 Freestanding Double Ended Oval Bath Tub, 1600mm x 750mm Roxor 978.33000000 P 0 N N N
92539 Square Freestanding Back to Wall Bath Tub, 1615mm x 720mm Roxor 932.50000000 P 0 N N N
92538 Curved Back to Wall Double Ended Bath Tub, 1700mm x 750mm Roxor 901.67000000 P 0 N N N
92523 Freestanding Double Ended Oval Bath Tub, 1600mm x 700mm Roxor 895.83000000 P 0 N N N
92536 Soft Square Double Ended Freestanding Bath Tub, 1700mm x 800mm Roxor 881.67000000 P 0 N N N
92537 Curved Back to Wall Double Ended Bath Tub, 1500mm x 750mm Roxor 838.33000000 P 0 N N N
92535 Freestanding Double Ended Boat Bath Tub, 1800mm x 745mm Roxor 771.67000000 P 0 N N N
92534 Freestanding Double Ended Boat Bath Tub, 1655mm x 745mm Roxor 725.00000000 P 0 N N N