SELECT 
  cscart_aprilproducts.*, 
  cscart_aprilproduct_descriptions.*, 
  MIN(
    IF(
      cscart_aprilproduct_prices.percentage_discount = 0, 
      cscart_aprilproduct_prices.price, 
      cscart_aprilproduct_prices.price - (
        cscart_aprilproduct_prices.price * cscart_aprilproduct_prices.percentage_discount
      )/ 100
    )
  ) as price, 
  GROUP_CONCAT(
    CASE WHEN (
      cscart_aprilproducts_categories.link_type = 'M'
    ) THEN CONCAT(
      cscart_aprilproducts_categories.category_id, 
      'M'
    ) ELSE cscart_aprilproducts_categories.category_id END 
    ORDER BY 
      cscart_aprilcategories.storefront_id IN (0, 1) DESC, 
      (
        cscart_aprilproducts_categories.link_type = 'M'
      ) DESC, 
      cscart_aprilproducts_categories.category_position ASC, 
      cscart_aprilproducts_categories.category_id ASC
  ) as category_ids, 
  popularity.total as popularity, 
  company_descr.i18n_company as company_name, 
  cscart_aprilproduct_sales.amount as sales_amount, 
  cscart_aprilseo_names.name as seo_name, 
  cscart_aprilseo_names.path as seo_path, 
  MIN(point_prices.point_price) as point_price, 
  cscart_aprildiscussion.type as discussion_type, 
  cscart_aprilproduct_review_prepared_data.average_rating average_rating, 
  cscart_aprilproduct_review_prepared_data.reviews_count product_reviews_count 
FROM 
  cscart_aprilproducts 
  LEFT JOIN cscart_aprilproduct_prices ON cscart_aprilproduct_prices.product_id = cscart_aprilproducts.product_id 
  AND cscart_aprilproduct_prices.lower_limit = 1 
  AND cscart_aprilproduct_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN cscart_aprilproduct_descriptions ON cscart_aprilproduct_descriptions.product_id = cscart_aprilproducts.product_id 
  AND cscart_aprilproduct_descriptions.lang_code = 'en' 
  LEFT JOIN cscart_aprilcompany_descriptions as company_descr ON company_descr.company_id = cscart_aprilproducts.company_id 
  AND company_descr.lang_code = 'en' 
  LEFT JOIN cscart_aprilcompanies as companies ON companies.company_id = cscart_aprilproducts.company_id 
  INNER JOIN cscart_aprilproducts_categories ON cscart_aprilproducts_categories.product_id = cscart_aprilproducts.product_id 
  INNER JOIN cscart_aprilcategories ON cscart_aprilcategories.category_id = cscart_aprilproducts_categories.category_id 
  AND cscart_aprilcategories.storefront_id IN (0, 1) 
  AND (
    cscart_aprilcategories.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_aprilcategories.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_aprilcategories.usergroup_ids
    )
  ) 
  AND (
    cscart_aprilproducts.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_aprilproducts.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_aprilproducts.usergroup_ids
    )
  ) 
  AND cscart_aprilcategories.status IN ('A', 'H') 
  AND cscart_aprilproducts.status IN ('A', 'H') 
  LEFT JOIN cscart_aprilproduct_popularity as popularity ON popularity.product_id = cscart_aprilproducts.product_id 
  LEFT JOIN cscart_aprilproduct_sales ON cscart_aprilproduct_sales.product_id = cscart_aprilproducts.product_id 
  AND cscart_aprilproduct_sales.category_id = 253 
  LEFT JOIN cscart_aprilseo_names ON cscart_aprilseo_names.object_id = 162 
  AND cscart_aprilseo_names.type = 'p' 
  AND cscart_aprilseo_names.dispatch = '' 
  AND cscart_aprilseo_names.lang_code = 'en' 
  LEFT JOIN cscart_aprilproduct_point_prices as point_prices ON point_prices.product_id = cscart_aprilproducts.product_id 
  AND point_prices.lower_limit = 1 
  AND point_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN cscart_aprildiscussion ON cscart_aprildiscussion.object_id = cscart_aprilproducts.product_id 
  AND cscart_aprildiscussion.object_type = 'P' 
  LEFT JOIN cscart_aprilproduct_review_prepared_data ON cscart_aprilproduct_review_prepared_data.product_id = cscart_aprilproducts.product_id 
  AND cscart_aprilproduct_review_prepared_data.storefront_id = 0 
WHERE 
  cscart_aprilproducts.product_id = 162 
  AND (
    companies.status IN ('A') 
    OR cscart_aprilproducts.company_id = 0
  ) 
GROUP BY 
  cscart_aprilproducts.product_id

Query time 0.00132

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "3.28"
    },
    "grouping_operation": {
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "point_prices",
            "access_type": "system",
            "possible_keys": [
              "unique_key",
              "src_k"
            ],
            "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": "24"
            },
            "used_columns": [
              "product_id",
              "point_price",
              "lower_limit",
              "usergroup_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_aprilproducts",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "status"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_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.20",
              "prefix_cost": "0.00",
              "data_read_per_join": "4K"
            },
            "used_columns": [
              "product_id",
              "product_code",
              "product_type",
              "status",
              "company_id",
              "list_price",
              "amount",
              "weight",
              "length",
              "width",
              "height",
              "shipping_freight",
              "low_avail_limit",
              "timestamp",
              "updated_timestamp",
              "usergroup_ids",
              "is_edp",
              "edp_shipping",
              "unlimited_download",
              "tracking",
              "free_shipping",
              "zero_price_action",
              "is_pbp",
              "is_op",
              "is_oper",
              "is_returnable",
              "return_period",
              "avail_since",
              "out_of_stock_actions",
              "localization",
              "min_qty",
              "max_qty",
              "qty_step",
              "list_qty_count",
              "tax_ids",
              "age_verification",
              "age_limit",
              "options_type",
              "exceptions_type",
              "details_layout",
              "shipping_params",
              "show_videos_before_images",
              "autoplay_videos",
              "facebook_obj_type",
              "parent_product_id",
              "buy_now_url",
              "units_in_product",
              "show_price_per_x_units",
              "enable_print_product",
              "ec_clipart_lists"
            ]
          }
        },
        {
          "table": {
            "table_name": "popularity",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "total"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_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.20",
              "prefix_cost": "0.00",
              "data_read_per_join": "32"
            },
            "used_columns": [
              "product_id",
              "total"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_aprilproduct_sales",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "pa"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id",
              "product_id"
            ],
            "key_length": "6",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 0,
            "rows_produced_per_join": 1,
            "filtered": "0.00",
            "unique_row_not_found": true,
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.20",
              "prefix_cost": "0.00",
              "data_read_per_join": "16"
            },
            "used_columns": [
              "category_id",
              "product_id",
              "amount"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_aprilproduct_prices",
            "access_type": "ref",
            "possible_keys": [
              "usergroup",
              "product_id",
              "lower_limit",
              "usergroup_id"
            ],
            "key": "product_id",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.00",
              "eval_cost": "0.20",
              "prefix_cost": "1.20",
              "data_read_per_join": "24"
            },
            "used_columns": [
              "product_id",
              "price",
              "percentage_discount",
              "lower_limit",
              "usergroup_id"
            ],
            "attached_condition": "<if>(is_not_null_compl(cscart_aprilproduct_prices), ((`vishalecarter_april_setup`.`cscart_aprilproduct_prices`.`lower_limit` = 1) and (`vishalecarter_april_setup`.`cscart_aprilproduct_prices`.`usergroup_id` in (0,0,1))), true)"
          }
        },
        {
          "table": {
            "table_name": "cscart_aprilproduct_descriptions",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "product_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.20",
              "prefix_cost": "1.40",
              "data_read_per_join": "4K"
            },
            "used_columns": [
              "product_id",
              "lang_code",
              "product",
              "shortname",
              "short_description",
              "full_description",
              "meta_keywords",
              "meta_description",
              "search_words",
              "page_title",
              "age_warning_message",
              "promo_text",
              "unit_name"
            ]
          }
        },
        {
          "table": {
            "table_name": "company_descr",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "company_id",
              "lang_code"
            ],
            "key_length": "10",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.20",
              "prefix_cost": "1.60",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "company_id",
              "lang_code",
              "i18n_company"
            ]
          }
        },
        {
          "table": {
            "table_name": "companies",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "company_id"
            ],
            "key_length": "4",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.20",
              "prefix_cost": "1.80",
              "data_read_per_join": "6K"
            },
            "used_columns": [
              "company_id",
              "status"
            ],
            "attached_condition": "<if>(found_match(companies), ((`vishalecarter_april_setup`.`companies`.`status` = 'A') or 0), true)"
          }
        },
        {
          "table": {
            "table_name": "cscart_aprilproducts_categories",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "pt"
            ],
            "key": "pt",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.00",
              "eval_cost": "0.20",
              "prefix_cost": "3.00",
              "data_read_per_join": "16"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type",
              "category_position"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_aprilcategories",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "vishalecarter_april_setup.cscart_aprilproducts_categories.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.01",
              "prefix_cost": "3.20",
              "data_read_per_join": "133"
            },
            "used_columns": [
              "category_id",
              "storefront_id",
              "usergroup_ids",
              "status"
            ],
            "attached_condition": "((`vishalecarter_april_setup`.`cscart_aprilcategories`.`storefront_id` in (0,1)) and ((`vishalecarter_april_setup`.`cscart_aprilcategories`.`usergroup_ids` = '') or find_in_set(0,`vishalecarter_april_setup`.`cscart_aprilcategories`.`usergroup_ids`) or find_in_set(1,`vishalecarter_april_setup`.`cscart_aprilcategories`.`usergroup_ids`)) and (`vishalecarter_april_setup`.`cscart_aprilcategories`.`status` in ('A','H')))"
          }
        },
        {
          "table": {
            "table_name": "cscart_aprilseo_names",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "dispatch"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "type",
              "dispatch",
              "lang_code"
            ],
            "key_length": "206",
            "ref": [
              "const",
              "const",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.05",
              "eval_cost": "0.01",
              "prefix_cost": "3.26",
              "data_read_per_join": "86"
            },
            "used_columns": [
              "name",
              "object_id",
              "type",
              "dispatch",
              "path",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_aprildiscussion",
            "access_type": "const",
            "possible_keys": [
              "object_id"
            ],
            "key": "object_id",
            "used_key_parts": [
              "object_id",
              "object_type"
            ],
            "key_length": "6",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.01",
              "prefix_cost": "3.27",
              "data_read_per_join": "1"
            },
            "used_columns": [
              "object_id",
              "object_type",
              "type"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_aprilproduct_review_prepared_data",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id",
              "storefront_id"
            ],
            "key_length": "7",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.01",
              "prefix_cost": "3.28",
              "data_read_per_join": "0"
            },
            "used_columns": [
              "product_id",
              "storefront_id",
              "average_rating",
              "reviews_count"
            ]
          }
        }
      ]
    }
  }
}

Result

product_id product_code product_type status company_id list_price amount weight length width height shipping_freight low_avail_limit timestamp updated_timestamp usergroup_ids is_edp edp_shipping unlimited_download tracking free_shipping zero_price_action is_pbp is_op is_oper is_returnable return_period avail_since out_of_stock_actions localization min_qty max_qty qty_step list_qty_count tax_ids age_verification age_limit options_type exceptions_type details_layout shipping_params show_videos_before_images autoplay_videos facebook_obj_type parent_product_id buy_now_url units_in_product show_price_per_x_units enable_print_product ec_clipart_lists lang_code product shortname short_description full_description meta_keywords meta_description search_words page_title age_warning_message promo_text unit_name price category_ids popularity company_name sales_amount seo_name seo_path point_price discussion_type average_rating product_reviews_count
162 A0162LEU0L P A 1 0.00 3 0.000 0 0 0 0.00 0 1328644800 1329220610 0 N N N N Y N N Y 10 0 N 6 N 0 default a:5:{s:16:"min_items_in_box";i:0;s:16:"max_items_in_box";i:0;s:10:"box_length";i:0;s:9:"box_width";i:0;s:10:"box_height";i:0;} N N 0 0.000 1.000 N en AIKO SAFE Model AS 180 Office Safe with one shelve & one drawer <table> <tbody> <tr> <td>All AIKO safes are designed to provide maximum protection against fire and foil any tampering and break-ins. The anti-burglary Construction: Body &amp; Door: Tough steel plates precisely engineered using industry leading manufacturing techniques. Inserted with Premium formulated Ultra Fine Bubble Concrete provides the most effective insulation against intense heat to ensure valuables are protected from burglary &amp; fire. Automatic Stopper: The automatic stopper feature allows users to close the door with slightest of push. Locking System: Fitted with 4 directional Solid Steel bolt locking system to lock horizontally &amp; Vertically. Fitted with Dual Key lock system, with ultra secure cylinder Keys, Key &amp; Dial or Key &amp; Digital lock system. Automatic Re-locking: Fitted with Automatic Re-locking device. Test &amp; Approvals: Achieved the following international test certificates. 1. JIS - Japan Standard 2. KS - Korea Standard 3. SINTEF - Norway Standard 4. CNAL - China Standard Built in Alarm: (Optional) To set off anti burglary alarm</td> </tr> </tbody> </table> <table width="100%" style="margin-top: 20px;"> <tbody> <tr> <td colspan="8"> <h4>SIZE (APPROX.) &amp; BRIEF SPECIFICATION</h4> </td> </tr> <tr> <td colspan="8"> <table width="100%"> <tbody> <tr bgcolor="#660000"> <td class="arial_11pt_white" style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #ffffff; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 6px; text-decoration: none;" width="45%" height="35"><strong>Model</strong></td> <td class="arial_11pt_white" style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #ffffff; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 6px; text-decoration: none;" width="55%"><strong>AS-180</strong></td> </tr> <tr> <td width="45%">Outside</td> <td width="55%">H900 X W600 X D570 mm</td> </tr> <tr> <td>Inside</td> <td>H693 X W462 X D360 mm</td> </tr> <tr> <td>Weight</td> <td>180 Kgs</td> </tr> <tr> <td>Accessory</td> <td>1 Shelf, 1 Drawer</td> </tr> <tr> <td>Capacity</td> <td>116L</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <p class="product-promo-text"><span class="product-promo-header">FREE US shipping over $100!</span><span class="product-promo-body">Orders within next 2 days will be shipped on Monday</span></p> 32750.00000000 253M 63 CS-Cart aiko-safe-model-as-180-office-safe-with-one-shelve-and-one-drawer 250/253