SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  products.amount, 
  descr1.product as product, 
  companies.company as company_name, 
  variation_group_products.group_id AS variation_group_id, 
  products.product_type, 
  products.parent_product_id 
FROM 
  cscart_products as products 
  LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id 
  AND descr1.lang_code = 'ar' 
  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) 
  INNER JOIN cscart_product_variation_group_products AS variation_group_products ON variation_group_products.product_id = products.product_id 
WHERE 
  1 
  AND companies.status IN ('A') 
  AND (
    products.amount > 0 
    OR products.tracking = 'D'
  ) 
  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 variation_group_products.group_id IN (
    226, 73, 203, 45, 213, 204, 812, 210, 201, 
    227, 183, 239, 415, 202
  ) 
  AND products.product_type != 'D' 
GROUP BY 
  products.product_id 
ORDER BY 
  NULL asc

Query time 0.00643

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "59.95"
    },
    "ordering_operation": {
      "using_filesort": false,
      "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": 10,
              "rows_produced_per_join": 1,
              "filtered": "10.00",
              "cost_info": {
                "read_cost": "1.46",
                "eval_cost": "0.10",
                "prefix_cost": "1.56",
                "data_read_per_join": "6K"
              },
              "used_columns": [
                "company_id",
                "status",
                "company"
              ],
              "attached_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`companies`.`status` = 'A')"
            }
          },
          {
            "table": {
              "table_name": "variation_group_products",
              "access_type": "range",
              "possible_keys": [
                "PRIMARY",
                "idx_group_id"
              ],
              "key": "idx_group_id",
              "used_key_parts": [
                "group_id"
              ],
              "key_length": "3",
              "rows_examined_per_scan": 63,
              "rows_produced_per_join": 63,
              "filtered": "100.00",
              "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`variation_group_products`.`group_id` in (226,73,203,45,213,204,812,210,201,227,183,239,415,202))",
              "using_join_buffer": "hash join",
              "cost_info": {
                "read_cost": "25.56",
                "eval_cost": "6.30",
                "prefix_cost": "33.42",
                "data_read_per_join": "1008"
              },
              "used_columns": [
                "product_id",
                "group_id"
              ]
            }
          },
          {
            "table": {
              "table_name": "products",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "status"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 3,
              "filtered": "5.00",
              "cost_info": {
                "read_cost": "15.75",
                "eval_cost": "0.32",
                "prefix_cost": "55.47",
                "data_read_per_join": "13K"
              },
              "used_columns": [
                "product_id",
                "product_type",
                "status",
                "company_id",
                "amount",
                "usergroup_ids",
                "tracking",
                "parent_product_id"
              ],
              "attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`products`.`company_id` = `softwarepirmam_hewadelivard_cscart_4`.`companies`.`company_id`) and ((`softwarepirmam_hewadelivard_cscart_4`.`products`.`amount` > 0) or (`softwarepirmam_hewadelivard_cscart_4`.`products`.`tracking` = 'D')) and ((`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`status` = 'A') and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`product_type` <> 'D'))"
            }
          },
          {
            "table": {
              "table_name": "products_categories",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY",
                "pt"
              ],
              "key": "pt",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id"
              ],
              "rows_examined_per_scan": 2,
              "rows_produced_per_join": 6,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "1.58",
                "eval_cost": "0.63",
                "prefix_cost": "57.68",
                "data_read_per_join": "100"
              },
              "used_columns": [
                "product_id",
                "category_id"
              ]
            }
          },
          {
            "table": {
              "table_name": "cscart_categories",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "c_status",
                "p_category_id"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "category_id"
              ],
              "key_length": "3",
              "ref": [
                "softwarepirmam_hewadelivard_cscart_4.products_categories.category_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "5.00",
              "cost_info": {
                "read_cost": "1.58",
                "eval_cost": "0.03",
                "prefix_cost": "59.88",
                "data_read_per_join": "1010"
              },
              "used_columns": [
                "category_id",
                "storefront_id",
                "usergroup_ids",
                "status"
              ],
              "attached_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`status` in ('A','H')) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`storefront_id` in (0,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": [
                "softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "0.04",
                "eval_cost": "0.03",
                "prefix_cost": "59.95",
                "data_read_per_join": "1K"
              },
              "used_columns": [
                "product_id",
                "lang_code",
                "product"
              ]
            }
          }
        ]
      }
    }
  }
}

Result

product_id amount product company_name variation_group_id product_type parent_product_id
908 100 شاومي بودز 5 برو Delivard Store 45 P 0
134 100 شاومي بودز 5 برو Delivard Store 45 V 908
1254 100 سوار شاومي الذكي 9 برو Delivard Store 73 V 247
1253 100 سوار شاومي الذكي 9 برو Delivard Store 73 V 247
247 100 سوار شاومي الذكي 9 برو Delivard Store 73 P 0
2395 100 Xiaomi wireless mouse 3 Delivard Store 183 P 0
2396 100 Xiaomi wireless mouse 3 Delivard Store 183 V 2395
2397 100 Xiaomi wireless mouse 3 Delivard Store 183 V 2395
2398 100 Xiaomi wireless mouse 3 Delivard Store 183 V 2395
2467 100 شاومي 15 ألترا Delivard Store 201 V 2471
2468 100 شاومي 15 ألترا Delivard Store 201 V 2471
2469 100 شاومي 15 ألترا Delivard Store 201 V 2471
2470 100 شاومي 15 ألترا Delivard Store 201 V 2471
2471 100 شاومي 15 ألترا Delivard Store 201 P 0
2472 100 شاومي 15 ألترا Delivard Store 201 V 2471
2473 100 شاومي 15 Delivard Store 202 P 0
2475 100 شاومي 15 Delivard Store 202 V 2473
2476 100 شاومي 15 Delivard Store 202 V 2473
2477 100 شاومي 15 Delivard Store 202 V 2473
2478 100 شاومي 14 تي برو Delivard Store 203 P 0
2483 100 شاومي 14 تي برو Delivard Store 203 V 2478
2482 100 شاومي 14 تي برو Delivard Store 203 V 2478
2484 100 شاومي 14 تي برو Delivard Store 203 V 2478
2485 100 شاومي 14 تي برو Delivard Store 203 V 2478
2486 100 شاومي 14 تي برو Delivard Store 203 V 2478
2487 100 شاومي 14 تي برو Delivard Store 203 V 2478
2488 100 شاومي 14 تي برو Delivard Store 203 V 2478
2489 100 شاومي 14 تي برو Delivard Store 203 V 2478
2490 100 شاومي 14 تي Delivard Store 204 P 0
2491 100 شاومي 14 تي Delivard Store 204 V 2490
2492 100 شاومي 14 تي Delivard Store 204 V 2490
2493 100 شاومي 14 تي Delivard Store 204 V 2490
2494 100 شاومي 14 تي Delivard Store 204 V 2490
2495 100 شاومي 14 تي Delivard Store 204 V 2490
2496 100 شاومي 14 تي Delivard Store 204 V 2490
2497 100 شاومي 14 تي Delivard Store 204 V 2490
2512 100 شاومي باد 7 Delivard Store 210 V 2509
2509 100 شاومي باد 7 Delivard Store 210 P 0
2524 100 شاومي ريدمي إيه 5 Delivard Store 213 V 2527
2525 100 شاومي ريدمي إيه 5 Delivard Store 213 V 2527
2526 100 شاومي ريدمي إيه 5 Delivard Store 213 V 2527
2527 100 شاومي ريدمي إيه 5 Delivard Store 213 P 0
2528 100 شاومي ريدمي إيه 5 Delivard Store 213 V 2527
2529 100 شاومي ريدمي إيه 5 Delivard Store 213 V 2527
2530 100 شاومي ريدمي إيه 5 Delivard Store 213 V 2527
2531 100 شاومي ريدمي إيه 5 Delivard Store 213 V 2527
8422 100 شاومي ريدمي باد برو 5 جي Delivard Store 226 V 2574
2574 100 شاومي ريدمي باد برو 5 جي Delivard Store 226 P 0
2576 100 شاومي بوكو إم 7 برو 5 جي Delivard Store 227 P 0
2577 100 شاومي بوكو إم 7 برو 5 جي Delivard Store 227 V 2576
2578 100 شاومي بوكو إم 7 برو 5 جي Delivard Store 227 V 2576
2615 100 شاومي بوكو سي 61 Delivard Store 239 V 2620
2620 100 شاومي بوكو سي 61 Delivard Store 239 P 0
2621 100 شاومي بوكو سي 61 Delivard Store 239 V 2620
2502 100 شاومي 14 ألترا Delivard Store 415 P 0
3639 100 شاومي 14 ألترا Delivard Store 415 V 2502
2432 100 Xiaomi TV A Pro 2026 75" Delivard Store 812 P 0
8485 100 Xiaomi TV A Pro 2026 65" Delivard Store 812 P 0
8484 100 Xiaomi TV A Pro 2026 55" Delivard Store 812 P 0
8483 100 Xiaomi TV A Pro 2026 43" Delivard Store 812 P 0