SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  descr1.product as product, 
  companies.company as company_name, 
  popularity.total as popularity, 
  MIN(
    IF(
      prices.percentage_discount = 0, 
      prices.price, 
      prices.price - (
        prices.price * prices.percentage_discount
      )/ 100
    )
  ) as price, 
  absolute_rating.rating AS absolute_vendor_rating, 
  products.product_type, 
  products.parent_product_id, 
  products.list_price as list_price, 
  MAX(
    100 - (
      (prices.price * 100) / products.list_price
    )
  ) AS sales_discount, 
  descr1.full_description as full_description 
FROM 
  cscart_products as products 
  LEFT JOIN cscart_product_features_values ON cscart_product_features_values.product_id = products.product_id 
  AND cscart_product_features_values.lang_code = 'en' 
  LEFT JOIN cscart_product_features ON cscart_product_features_values.feature_id = cscart_product_features.feature_id 
  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_product_prices as prices_2 ON prices.product_id = prices_2.product_id 
  AND prices_2.lower_limit = 1 
  AND prices_2.price < prices.price 
  AND prices_2.usergroup_id IN (0, 0, 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) 
  LEFT JOIN cscart_product_popularity as popularity ON popularity.product_id = products.product_id 
  LEFT JOIN cscart_absolute_rating AS absolute_rating ON absolute_rating.object_id = products.company_id 
  AND absolute_rating.object_type = 'company' 
  LEFT JOIN cscart_product_sales ON cscart_product_sales.product_id = products.product_id 
  AND cscart_product_sales.category_id = products_categories.category_id 
WHERE 
  1 
  AND companies.status IN ('A') 
  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 prices_2.price IS NULL 
  AND products.parent_product_id = 0 
  AND products.product_type != 'D' 
GROUP BY 
  products.product_id 
HAVING 
  sales_discount > 0 
  AND price < list_price 
ORDER BY 
  sales_discount desc, 
  products.product_id ASC 
LIMIT 
  0, 10

Query time 0.01999

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "50.86"
    },
    "ordering_operation": {
      "using_filesort": true,
      "grouping_operation": {
        "using_temporary_table": true,
        "using_filesort": false,
        "nested_loop": [
          {
            "table": {
              "table_name": "absolute_rating",
              "access_type": "system",
              "possible_keys": [
                "PRIMARY"
              ],
              "rows_examined_per_scan": 0,
              "rows_produced_per_join": 1,
              "filtered": "0.00",
              "const_row_not_found": true,
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "0.20",
                "prefix_cost": "0.00",
                "data_read_per_join": "112"
              },
              "used_columns": [
                "object_id",
                "object_type",
                "rating"
              ]
            }
          },
          {
            "table": {
              "table_name": "companies",
              "access_type": "ALL",
              "possible_keys": [
                "PRIMARY"
              ],
              "rows_examined_per_scan": 5,
              "rows_produced_per_join": 1,
              "filtered": "20.00",
              "cost_info": {
                "read_cost": "2.98",
                "eval_cost": "0.20",
                "prefix_cost": "3.18",
                "data_read_per_join": "6K"
              },
              "used_columns": [
                "company_id",
                "status",
                "company"
              ],
              "attached_condition": "(`pankajecarter_systemfour`.`companies`.`status` = 'A')"
            }
          },
          {
            "table": {
              "table_name": "cscart_categories",
              "access_type": "ALL",
              "possible_keys": [
                "PRIMARY",
                "c_status",
                "p_category_id"
              ],
              "rows_examined_per_scan": 84,
              "rows_produced_per_join": 3,
              "filtered": "4.00",
              "using_join_buffer": "Block Nested Loop",
              "cost_info": {
                "read_cost": "19.59",
                "eval_cost": "0.67",
                "prefix_cost": "23.44",
                "data_read_per_join": "8K"
              },
              "used_columns": [
                "category_id",
                "storefront_id",
                "usergroup_ids",
                "status"
              ],
              "attached_condition": "(((`pankajecarter_systemfour`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`pankajecarter_systemfour`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`pankajecarter_systemfour`.`cscart_categories`.`usergroup_ids`)) and (`pankajecarter_systemfour`.`cscart_categories`.`status` in ('A','H')) and (`pankajecarter_systemfour`.`cscart_categories`.`storefront_id` in (0,1)))"
            }
          },
          {
            "table": {
              "table_name": "products_categories",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY",
                "pt"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "category_id"
              ],
              "key_length": "3",
              "ref": [
                "pankajecarter_systemfour.cscart_categories.category_id"
              ],
              "rows_examined_per_scan": 3,
              "rows_produced_per_join": 10,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "3.61",
                "eval_cost": "2.02",
                "prefix_cost": "29.06",
                "data_read_per_join": "161"
              },
              "used_columns": [
                "product_id",
                "category_id"
              ]
            }
          },
          {
            "table": {
              "table_name": "products",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "status",
                "idx_parent_product_id"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "pankajecarter_systemfour.products_categories.product_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "7.93",
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "0.16",
                "prefix_cost": "31.08",
                "data_read_per_join": "3K"
              },
              "used_columns": [
                "product_id",
                "product_type",
                "status",
                "company_id",
                "list_price",
                "usergroup_ids",
                "parent_product_id"
              ],
              "attached_condition": "((`pankajecarter_systemfour`.`products`.`company_id` = `pankajecarter_systemfour`.`companies`.`company_id`) and (`pankajecarter_systemfour`.`products`.`parent_product_id` = 0) and ((`pankajecarter_systemfour`.`products`.`usergroup_ids` = '') or find_in_set(0,`pankajecarter_systemfour`.`products`.`usergroup_ids`) or find_in_set(1,`pankajecarter_systemfour`.`products`.`usergroup_ids`)) and (`pankajecarter_systemfour`.`products`.`status` = 'A') and (`pankajecarter_systemfour`.`products`.`product_type` <> 'D'))"
            }
          },
          {
            "table": {
              "table_name": "popularity",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "total"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "pankajecarter_systemfour.products_categories.product_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "0.16",
                "prefix_cost": "31.24",
                "data_read_per_join": "25"
              },
              "used_columns": [
                "product_id",
                "total"
              ]
            }
          },
          {
            "table": {
              "table_name": "cscart_product_sales",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "pa"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "category_id",
                "product_id"
              ],
              "key_length": "6",
              "ref": [
                "pankajecarter_systemfour.cscart_categories.category_id",
                "pankajecarter_systemfour.products_categories.product_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "0.16",
                "prefix_cost": "31.40",
                "data_read_per_join": "12"
              },
              "used_columns": [
                "category_id",
                "product_id"
              ]
            }
          },
          {
            "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": [
                "pankajecarter_systemfour.products_categories.product_id"
              ],
              "rows_examined_per_scan": 3,
              "rows_produced_per_join": 2,
              "filtered": "97.92",
              "index_condition": "((`pankajecarter_systemfour`.`prices`.`lower_limit` = 1) and (`pankajecarter_systemfour`.`prices`.`usergroup_id` in (0,0,1)))",
              "cost_info": {
                "read_cost": "3.06",
                "eval_cost": "0.47",
                "prefix_cost": "34.94",
                "data_read_per_join": "56"
              },
              "used_columns": [
                "product_id",
                "price",
                "percentage_discount",
                "lower_limit",
                "usergroup_id"
              ]
            }
          },
          {
            "table": {
              "table_name": "prices_2",
              "access_type": "ref",
              "possible_keys": [
                "usergroup",
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "key": "usergroup",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "pankajecarter_systemfour.products_categories.product_id"
              ],
              "rows_examined_per_scan": 3,
              "rows_produced_per_join": 0,
              "filtered": "9.79",
              "not_exists": true,
              "cost_info": {
                "read_cost": "8.99",
                "eval_cost": "0.14",
                "prefix_cost": "45.35",
                "data_read_per_join": "16"
              },
              "used_columns": [
                "product_id",
                "price",
                "lower_limit",
                "usergroup_id"
              ],
              "attached_condition": "(<if>(found_match(prices_2), isnull(`pankajecarter_systemfour`.`prices_2`.`price`), true) and <if>(is_not_null_compl(prices_2), ((`pankajecarter_systemfour`.`prices_2`.`lower_limit` = 1) and (`pankajecarter_systemfour`.`prices_2`.`price` < `pankajecarter_systemfour`.`prices`.`price`) and (`pankajecarter_systemfour`.`prices_2`.`usergroup_id` in (0,0,1))), true))"
            }
          },
          {
            "table": {
              "table_name": "cscart_product_features_values",
              "access_type": "ref",
              "possible_keys": [
                "lang_code",
                "product_id",
                "idx_product_feature_variant_id"
              ],
              "key": "idx_product_feature_variant_id",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "pankajecarter_systemfour.products_categories.product_id"
              ],
              "rows_examined_per_scan": 11,
              "rows_produced_per_join": 7,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "0.97",
                "eval_cost": "1.52",
                "prefix_cost": "47.83",
                "data_read_per_join": "5K"
              },
              "used_columns": [
                "feature_id",
                "product_id",
                "lang_code"
              ],
              "attached_condition": "<if>(is_not_null_compl(cscart_product_features_values), (`pankajecarter_systemfour`.`cscart_product_features_values`.`lang_code` = 'en'), true)"
            }
          },
          {
            "table": {
              "table_name": "cscart_product_features",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "feature_id"
              ],
              "key_length": "3",
              "ref": [
                "pankajecarter_systemfour.cscart_product_features_values.feature_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 7,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "1.52",
                "prefix_cost": "49.35",
                "data_read_per_join": "3K"
              },
              "used_columns": [
                "feature_id"
              ]
            }
          },
          {
            "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": [
                "pankajecarter_systemfour.products_categories.product_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 7,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "1.52",
                "prefix_cost": "50.87",
                "data_read_per_join": "34K"
              },
              "used_columns": [
                "product_id",
                "lang_code",
                "product",
                "full_description"
              ]
            }
          }
        ]
      }
    }
  }
}

Result

product_id product company_name popularity price absolute_vendor_rating product_type parent_product_id list_price sales_discount full_description
231 2011 Tycoon CS-Cart 31 99.00000000 P 0 10000.00 99.010000 <p>Hydration Capacity: 100 oz (3 L)<br><br>Total Capacity: 1125 cu in (18.44 L)<br><br>CamelBak® Got Your Bak&trade; Guarantee: If we built it, we'll Bak it&trade; with our lifetime guarantee. <br><br>Reservoir Features: Quick Link&trade; System, 1/4 turn - easy open/close cap, lightweight fillport, dryer arms, center baffling and low-profile design, patented Big Bite&trade; Valve, HydroGuard&trade; technology, insulated PureFlow&trade; tube, easy-to-clean wide-mouth opening<br><br>BACK PANEL: Snowshed&trade;<br><br>HARNESS: Therminator&trade; provides easy access for frequent sipping, insulated and fully enclosed to protect against freezing<br><br>BELT: Load-bearing<br><br>Additional Features: <br>Snowboard / Ski Carry (Diagonal, Vertical or Horizontal), pack compression, goggle pocket, essentials pocket<br>Drop-out Probe Pocket for instant probe access -- locate survivors without unloading your pack<br><br>Designed to carry: skis/snowboard, shovel, probe, skins or snowshoes, goggles, extra layer, snack, phone, wallet, keys</p>
170 588 Chrome Wedge CS-Cart 152 145.99000000 P 0 1000.00 85.401000 <p>The 588 Forged wedge maintains the popular, tour-proven shape of its predecessor with a series of technological breakthroughs to provide even more performance. Every wedge is Precision Forged from 1025 carbon steel for incredibly soft, solid feel and the highest level of manufacturing consistency for supreme confidence and trust over every shot. Tour Zip Grooves&trade; and Laser Milled&trade; technology maximize spin in accordance with USGA regulations. Exclusive to the 588 Forged wedge is the Tour Concept Wedge steel shaft, co-developed and engineered by Cleveland Golf and industry leader True Temper. With a unique stiffness profile that features a less active tip, this shaft promotes a more penetrating ball flight, increased spin and optimal distance control along with superior feel. Choose from two different finishes – Satin and Chrome – as well as low, standard and high bounce options.</p>
180 18-55mm Portrait Lens CS-Cart 401 199.99000000 P 0 1000.00 80.001000 <p>Certain photos vividly remind you of memorable moments even at a quick glance. You can treasure such everlasting, memories with the 18-55mm lens. This lens enables you to create diverse images from any scene, including wide-angle and portrait shots, making your precious moments last forever.</p>
150 Wildwood city classic CS-Cart 51 120.00000000 P 0 600.00 80.000000 <div id="overview-bullets"> <ul class="bullet-points"> <li>Hi-Ten Remington Steel Wildwood Citi Comfort Frame</li> <li>45mm Travel Comfort Suspension Fork</li> <li>Compact Crankset w/ Integrated Chainguard</li> <li>SSW26 Double Tunnel Alloy Rims<span> </span></li> <li>Avenir Comfort Saddle w/ Supersoft Foam, Coil Springs</li> </ul> </div>
148 16GB A Series Walkman Video MP3 CS-Cart 28 130.00000000 P 0 219.00 40.639269 <p>With an A Series by your side, there's never a dull moment. The dazzling 2.8" (400x240) touch screen delivers incredible color and quickly serves up photos, videos, album artwork and more. Easily navigate your media library with the tap of a finger or via traditional button controls if you prefer. Experience your music wirelessly and stream audio to other compatible devices with integrated Bluetooth®. Sony Clear Audio technologies work as a team to make your music sound the best it can – Digital Sound Enhancement Engine, Clear Stereo and Clear Bass Audio Technologies offer deeper, richer sound plus S-Master&trade; MX amplification makes for higher signal to noise ratios and less distortion. Upload the matching lyric file and learn the words to your favorite song as your A Series scrolls them along the screen in sync with the music. Premium EX earbuds and USB cable included.</p>
149 8GB E Series Walkman Video MP3 CS-Cart 15 53.99000000 P 0 89.99 40.004445 <p>Long lasting battery offering up to 50 hours of music or up to 10 hours of video playback, FM tuner, Karaoke mode, Clear Audio technologies, EX headphones, integrated mic and 2.0" LCD.</p>
5 46" Class (45.9" Diag.) LCD 610 Series TV CS-Cart 21 899.99000000 P 0 1199.99 25.000208 <p> ConnectShare™ Movie lets you watch videos, play music or view photos from a USB drive. Simply plug your USB directly into your Samsung TV’s USB port and watch on the big screen with friends and family. </p>
349 46" Class (45.9" Diag.) LCD 610 Series TV CS-Cart 21 899.99000000 P 0 1199.99 25.000208 <p> ConnectShare™ Movie lets you watch videos, play music or view photos from a USB drive. Simply plug your USB directly into your Samsung TV’s USB port and watch on the big screen with friends and family. </p>
350 46" Class (45.9" Diag.) LCD 610 Series TV CS-Cart 24 899.99000000 P 0 1199.99 25.000208 <p> ConnectShare™ Movie lets you watch videos, play music or view photos from a USB drive. Simply plug your USB directly into your Samsung TV’s USB port and watch on the big screen with friends and family. </p>
428 46" Class (45.9" Diag.) LCD 610 Series TV CS-Cart 15 899.99000000 P 0 1199.99 25.000208 <p> ConnectShare™ Movie lets you watch videos, play music or view photos from a USB drive. Simply plug your USB directly into your Samsung TV’s USB port and watch on the big screen with friends and family. </p>