SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  descr1.product as product, 
  companies.company as company_name, 
  popularity.total as popularity, 
  products.product_type, 
  products.parent_product_id, 
  descr1.full_description as full_description 
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) 
  LEFT JOIN cscart_product_popularity as popularity ON popularity.product_id = products.product_id 
WHERE 
  1 
  AND companies.status IN ('A') 
  AND popularity.total >= 1 
  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 
  popularity.total desc, 
  products.product_id ASC 
LIMIT 
  0, 12

Query time 0.00753

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "42.89"
    },
    "ordering_operation": {
      "using_filesort": true,
      "grouping_operation": {
        "using_temporary_table": true,
        "using_filesort": false,
        "nested_loop": [
          {
            "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": "10.08",
                "eval_cost": "0.16",
                "prefix_cost": "41.16",
                "data_read_per_join": "3K"
              },
              "used_columns": [
                "product_id",
                "product_type",
                "status",
                "company_id",
                "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": "33.33",
              "cost_info": {
                "read_cost": "0.80",
                "eval_cost": "0.05",
                "prefix_cost": "42.12",
                "data_read_per_join": "8"
              },
              "used_columns": [
                "product_id",
                "total"
              ],
              "attached_condition": "(`pankajecarter_systemfour`.`popularity`.`total` >= 1)"
            }
          },
          {
            "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": 0,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "0.27",
                "eval_cost": "0.05",
                "prefix_cost": "42.44",
                "data_read_per_join": "1K"
              },
              "used_columns": [
                "product_id",
                "lang_code",
                "product",
                "full_description"
              ]
            }
          },
          {
            "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": 0,
              "filtered": "97.92",
              "using_index": true,
              "cost_info": {
                "read_cost": "0.29",
                "eval_cost": "0.16",
                "prefix_cost": "42.89",
                "data_read_per_join": "18"
              },
              "used_columns": [
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "attached_condition": "((`pankajecarter_systemfour`.`prices`.`lower_limit` = 1) and (`pankajecarter_systemfour`.`prices`.`usergroup_id` in (0,0,1)))"
            }
          }
        ]
      }
    }
  }
}

Result

product_id product company_name popularity product_type parent_product_id full_description
180 18-55mm Portrait Lens CS-Cart 398 P 0 <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>
353 18-55mm Portrait Lens CS-Cart 371 P 0 <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>
354 18-55mm Portrait Lens CS-Cart 368 P 0 <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>
352 18-55mm Portrait Lens CS-Cart 365 P 0 <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>
435 2011 Ice Queen CS-Cart 159 P 0 <p>Hydration Capacity: 70 oz (2 L)<br><br>Total Capacity: 1000 cu in (16.39 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: 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: S-Curved Women's Harness; Therminator&trade; provides easy access for frequent sipping, insulated and fully enclosed to protect against freezing<br><br>BELT: Removable 1" (25 mm) stability<br><br>Additional Features: <br>Tri-Zip design allows easy access to all your gear, compresion, goggle pocket, essentials pocket<br><br>Designed to carry: Helmet, goggles, extra layers, lunch, phone, wallet, keys</p>
443 2011 Ice Queen CS-Cart 156 P 0 <p>Hydration Capacity: 70 oz (2 L)<br><br>Total Capacity: 1000 cu in (16.39 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: 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: S-Curved Women's Harness; Therminator&trade; provides easy access for frequent sipping, insulated and fully enclosed to protect against freezing<br><br>BELT: Removable 1" (25 mm) stability<br><br>Additional Features: <br>Tri-Zip design allows easy access to all your gear, compresion, goggle pocket, essentials pocket<br><br>Designed to carry: Helmet, goggles, extra layers, lunch, phone, wallet, keys</p>
439 2011 Ice Queen CS-Cart 153 P 0 <p>Hydration Capacity: 70 oz (2 L)<br><br>Total Capacity: 1000 cu in (16.39 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: 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: S-Curved Women's Harness; Therminator&trade; provides easy access for frequent sipping, insulated and fully enclosed to protect against freezing<br><br>BELT: Removable 1" (25 mm) stability<br><br>Additional Features: <br>Tri-Zip design allows easy access to all your gear, compresion, goggle pocket, essentials pocket<br><br>Designed to carry: Helmet, goggles, extra layers, lunch, phone, wallet, keys</p>
170 588 Chrome Wedge CS-Cart 152 P 0 <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>
232 2011 Ice Queen CS-Cart 150 P 0 <p>Hydration Capacity: 70 oz (2 L)<br><br>Total Capacity: 1000 cu in (16.39 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: 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: S-Curved Women's Harness; Therminator&trade; provides easy access for frequent sipping, insulated and fully enclosed to protect against freezing<br><br>BELT: Removable 1" (25 mm) stability<br><br>Additional Features: <br>Tri-Zip design allows easy access to all your gear, compresion, goggle pocket, essentials pocket<br><br>Designed to carry: Helmet, goggles, extra layers, lunch, phone, wallet, keys</p>
345 2011 Ice Queen CS-Cart 147 P 0 <p>Hydration Capacity: 70 oz (2 L)<br><br>Total Capacity: 1000 cu in (16.39 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: 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: S-Curved Women's Harness; Therminator&trade; provides easy access for frequent sipping, insulated and fully enclosed to protect against freezing<br><br>BELT: Removable 1" (25 mm) stability<br><br>Additional Features: <br>Tri-Zip design allows easy access to all your gear, compresion, goggle pocket, essentials pocket<br><br>Designed to carry: Helmet, goggles, extra layers, lunch, phone, wallet, keys</p>
346 2011 Ice Queen CS-Cart 147 P 0 <p>Hydration Capacity: 70 oz (2 L)<br><br>Total Capacity: 1000 cu in (16.39 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: 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: S-Curved Women's Harness; Therminator&trade; provides easy access for frequent sipping, insulated and fully enclosed to protect against freezing<br><br>BELT: Removable 1" (25 mm) stability<br><br>Additional Features: <br>Tri-Zip design allows easy access to all your gear, compresion, goggle pocket, essentials pocket<br><br>Designed to carry: Helmet, goggles, extra layers, lunch, phone, wallet, keys</p>
280 T-shirt, Color: Black CS-Cart 97 P 0