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, 
  cscart_product_review_prepared_data.average_rating average_rating, 
  cscart_product_review_prepared_data.reviews_count product_reviews_count 
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_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 
  INNER JOIN cscart_product_variation_group_products AS variation_group_products ON variation_group_products.product_id = products.product_id 
  LEFT JOIN cscart_product_review_prepared_data ON cscart_product_review_prepared_data.product_id = products.product_id 
  AND cscart_product_review_prepared_data.storefront_id = 0 
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 (
    12179, 12245, 14602, 13660, 14832, 16316, 
    12178, 14525, 14681, 14947, 14601, 
    14804, 14675, 13370, 14806, 14942, 
    13505, 13426, 13535
  ) 
GROUP BY 
  products.product_id 
ORDER BY 
  NULL asc

Query time 0.01164

JSON explain

{
  "query_block": {
    "select_id": 1,
    "temporary_table": {
      "nested_loop": [
        {
          "table": {
            "table_name": "variation_group_products",
            "access_type": "range",
            "possible_keys": ["PRIMARY", "idx_group_id"],
            "key": "idx_group_id",
            "key_length": "3",
            "used_key_parts": ["group_id"],
            "rows": 62,
            "filtered": 100,
            "index_condition": "variation_group_products.group_id in (12179,12245,14602,13660,14832,16316,12178,14525,14681,14947,14601,14804,14675,13370,14806,14942,13505,13426,13535)"
          }
        },
        {
          "table": {
            "table_name": "products",
            "access_type": "eq_ref",
            "possible_keys": ["PRIMARY", "status"],
            "key": "PRIMARY",
            "key_length": "3",
            "used_key_parts": ["product_id"],
            "ref": ["dev_db.variation_group_products.product_id"],
            "rows": 1,
            "filtered": 51.89157104,
            "attached_condition": "(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` = 'A'"
          }
        },
        {
          "table": {
            "table_name": "companies",
            "access_type": "eq_ref",
            "possible_keys": ["PRIMARY"],
            "key": "PRIMARY",
            "key_length": "4",
            "used_key_parts": ["company_id"],
            "ref": ["dev_db.products.company_id"],
            "rows": 1,
            "filtered": 100,
            "attached_condition": "companies.`status` = 'A'"
          }
        },
        {
          "table": {
            "table_name": "descr1",
            "access_type": "eq_ref",
            "possible_keys": ["PRIMARY", "product_id"],
            "key": "PRIMARY",
            "key_length": "11",
            "used_key_parts": ["product_id", "lang_code"],
            "ref": ["dev_db.variation_group_products.product_id", "const"],
            "rows": 1,
            "filtered": 100,
            "attached_condition": "trigcond(descr1.lang_code = 'en')"
          }
        },
        {
          "table": {
            "table_name": "cscart_product_review_prepared_data",
            "access_type": "eq_ref",
            "possible_keys": ["PRIMARY"],
            "key": "PRIMARY",
            "key_length": "7",
            "used_key_parts": ["product_id", "storefront_id"],
            "ref": ["dev_db.variation_group_products.product_id", "const"],
            "rows": 1,
            "filtered": 100
          }
        },
        {
          "table": {
            "table_name": "products_categories",
            "access_type": "ref",
            "possible_keys": ["PRIMARY", "pt"],
            "key": "pt",
            "key_length": "3",
            "used_key_parts": ["product_id"],
            "ref": ["dev_db.variation_group_products.product_id"],
            "rows": 1,
            "filtered": 100
          }
        },
        {
          "table": {
            "table_name": "cscart_categories",
            "access_type": "eq_ref",
            "possible_keys": ["PRIMARY", "p_category_id"],
            "key": "PRIMARY",
            "key_length": "3",
            "used_key_parts": ["category_id"],
            "ref": ["dev_db.products_categories.category_id"],
            "rows": 1,
            "filtered": 100,
            "using_index": true
          }
        }
      ]
    }
  }
}

Result

product_id amount product company_name variation_group_id product_type parent_product_id average_rating product_reviews_count
14929 997 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Mixed Color Collection La Touche 12178 V 6555 5.00 1
14928 999 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Mixed Color Collection La Touche 12178 V 6555 5.00 1
14927 999 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Mixed Color Collection La Touche 12178 V 6555 5.00 1
14926 998 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Mixed Color Collection La Touche 12178 V 6555 5.00 1
14925 999 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Mixed Color Collection La Touche 12178 V 6555 5.00 1
6555 999 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Mixed Color Collection La Touche 12178 P 0 5.00 1
14933 999 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Original Color Collection La Touche 12179 V 6554 5.00 1
14932 998 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Original Color Collection La Touche 12179 V 6554 5.00 1
14931 999 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Original Color Collection La Touche 12179 V 6554 5.00 1
14930 999 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Original Color Collection La Touche 12179 V 6554 5.00 1
6554 999 Zafu, Meditation Cushion Stuffed With Mung Bean Husk, Original Color Collection La Touche 12179 P 0 5.00 1
15222 999 Relaxing Time Gift Set, Relaxing Gift Set, Soy Candle, Soap Flower, Birthday Gift, Self-Care Gift, Anniversary Gift, Perfect Present For Anyone The Joy Box 12245 V 15218 0
15221 999 Relaxing Time Gift Set, Relaxing Gift Set, Soy Candle, Soap Flower, Birthday Gift, Self-Care Gift, Anniversary Gift, Perfect Present For Anyone The Joy Box 12245 V 15218 0
15220 999 Relaxing Time Gift Set, Relaxing Gift Set, Soy Candle, Soap Flower, Birthday Gift, Self-Care Gift, Anniversary Gift, Perfect Present For Anyone The Joy Box 12245 V 15218 0
15219 999 Relaxing Time Gift Set, Relaxing Gift Set, Soy Candle, Soap Flower, Birthday Gift, Self-Care Gift, Anniversary Gift, Perfect Present For Anyone The Joy Box 12245 V 15218 0
15218 999 Relaxing Time Gift Set, Relaxing Gift Set, Soy Candle, Soap Flower, Birthday Gift, Self-Care Gift, Anniversary Gift, Perfect Present For Anyone The Joy Box 12245 P 0 0
6361 999 Relaxing Time Gift Set, Relaxing Gift Set, Soy Candle, Soap Flower, Birthday Gift, Self-Care Gift, Anniversary Gift, Perfect Present For Anyone The Joy Box 12245 V 15218 0
48798 999 Relaxing Time Gift Set, Relaxing Gift Set, Soy Candle, Soap Flower, Birthday Gift, Self-Care Gift, Anniversary Gift, Perfect Present For Anyone The Joy Box 12245 V 15218 0
48799 999 Relaxing Time Gift Set, Relaxing Gift Set, Soy Candle, Soap Flower, Birthday Gift, Self-Care Gift, Anniversary Gift, Perfect Present For Anyone The Joy Box 12245 V 15218 0
20930 999 Gourmand Scented Candle, Size S GOODMOODS 13370 V 2576 5.00 2
2576 999 Gourmand Scented Candle, Size S GOODMOODS 13370 P 0 5.00 2
21061 999 Scented Soy Candle Decorative Fern Calla Floral 13426 V 2492 5.00 3
2492 999 Scented Soy Candle Decorative Fern Calla Floral 13426 P 0 5.00 3
21189 999 Christmas Edition Handmade Soap Lecteur De Craft 13505 V 21188 5.00 3
21188 991 Christmas Edition Handmade Soap Lecteur De Craft 13505 P 0 5.00 3
21490 999 “Deforest Symphony” Scented Soy Candle Jar, Find Your Peace, Natural Ingredients, Scented Candle Gift, Gift Ideas Chia Kandles 13535 V 2302 5.00 1
21489 999 “Deforest Symphony” Scented Soy Candle Jar, Find Your Peace, Natural Ingredients, Scented Candle Gift, Gift Ideas Chia Kandles 13535 V 2302 5.00 1
21488 999 “Deforest Symphony” Scented Soy Candle Jar, Find Your Peace, Natural Ingredients, Scented Candle Gift, Gift Ideas Chia Kandles 13535 V 2302 5.00 1
21487 999 “Deforest Symphony” Scented Soy Candle Jar, Find Your Peace, Natural Ingredients, Scented Candle Gift, Gift Ideas Chia Kandles 13535 V 2302 5.00 1
2302 999 “Deforest Symphony” Scented Soy Candle Jar, Find Your Peace, Natural Ingredients, Scented Candle Gift, Gift Ideas Chia Kandles 13535 P 0 5.00 1
22070 999 White Amber Perfume Saigon Elixir 13660 V 2015 5.00 2
22069 999 White Amber Perfume Saigon Elixir 13660 V 2015 5.00 2
2015 999 White Amber Perfume Saigon Elixir 13660 P 0 5.00 2
25182 1018 Dried Flowers Rectangle & Hexagonal Wooden Frame, Meticulously Arranged Dried Flowers, Small Garden Full of Flowers, Decorative Picture Flora Collab 14525 V 25180 5.00 5
25180 1017 Dried Flowers Rectangle & Hexagonal Wooden Frame, Meticulously Arranged Dried Flowers, Small Garden Full of Flowers, Decorative Picture Flora Collab 14525 P 0 5.00 5
25181 1018 Dried Flowers Rectangle & Hexagonal Wooden Frame, Meticulously Arranged Dried Flowers, Small Garden Full of Flowers, Decorative Picture Flora Collab 14525 V 25180 5.00 5
405 1980 Rosemary Tea, Herbal Tea, Mental Relaxation Blend, Refreshing Tea, Digestive Support, Health Gift, Thoughtful Gift Là Nhiên 14601 P 0 4.90 21
25728 1993 Rosemary Tea, Herbal Tea, Mental Relaxation Blend, Refreshing Tea, Digestive Support, Health Gift, Thoughtful Gift Là Nhiên 14601 V 405 4.90 21
25730 1996 Butterfly Pea Flower Tea for Relaxation and Better Sleep, Herbal Blend for Relaxing, Ethically Sourced Ingredients, Perfect Health Gift Là Nhiên 14602 P 0 5.00 24
294 1998 Keychain With Feng Shui Crystal, Handmade Macrame Cord, Natural Stones, Dispels Negative Energy, Healing Stones, Spiritual Accessory Crystals Macrame 14675 P 0 5.00 1
26109 1998 Keychain With Feng Shui Crystal, Handmade Macrame Cord, Natural Stones, Dispels Negative Energy, Healing Stones, Spiritual Accessory Crystals Macrame 14675 V 294 5.00 1
286 997 Hand Embroidered Scarf Bông Bay Bay 14681 P 0 5.00 2
26604 999 Vintage Green Moss Clay Necklaces, Raku Ceramic Material, Rustic Design, Gentle Colors, Minimalist Style MFOX 14804 P 0 5.00 1
26605 999 Vintage Green Moss Clay Necklaces, Raku Ceramic Material, Rustic Design, Gentle Colors, Minimalist Style MFOX 14804 V 26604 5.00 1
26606 999 Vintage Green Moss Clay Necklaces, Raku Ceramic Material, Rustic Design, Gentle Colors, Minimalist Style MFOX 14804 V 26604 5.00 1
26608 999 Art Clay Necklace, Vintage Style MFOX 14806 P 0 5.00 3
26609 999 Art Clay Necklace, Vintage Style MFOX 14806 V 26608 5.00 3
26610 999 Art Clay Necklace, Vintage Style MFOX 14806 V 26608 5.00 3
26611 999 Art Clay Necklace, Vintage Style MFOX 14806 V 26608 5.00 3
26612 999 Art Clay Necklace, Vintage Style MFOX 14806 V 26608 5.00 3
26613 999 Art Clay Necklace, Vintage Style MFOX 14806 V 26608 5.00 3
2255 999 Vertical Rectangle Leather Crossbody Bag, Various Colors And Leather Material thanhsimone 14832 P 0 0
26674 999 Vertical Rectangle Leather Crossbody Bag, Various Colors And Leather Material thanhsimone 14832 P 2255 0
26675 999 Vertical Rectangle Leather Crossbody Bag, Various Colors And Leather Material thanhsimone 14832 P 2255 0
26864 999 Tropical Raw Honey Honimore 14942 P 0 0
27048 999 Tropical Raw Honey Honimore 14942 V 26864 0
27049 999 Tropical Raw Honey Honimore 14942 V 26864 0
27050 997 Tropical Raw Honey Honimore 14942 V 26864 0
26854 994 Biden Pilosa Flower Ripe Honey, Natural Honey, Bidens Alba Floral Honey, Nutritional Gift, Energy Supplement Honimore 14947 P 0 5.00 3
27055 998 Biden Pilosa Flower Ripe Honey, Natural Honey, Bidens Alba Floral Honey, Nutritional Gift, Energy Supplement Honimore 14947 V 26854 5.00 3
40526 999 Asa Clutch Bag, Beautiful Pattern, Standing Shape, Soft Material, Fits iPad and Notebook, Durable Handcrafted Bag Tomato Handmade 16316 P 0 5.00 2
40599 999 Asa Clutch Bag, Beautiful Pattern, Standing Shape, Soft Material, Fits iPad and Notebook, Durable Handcrafted Bag Tomato Handmade 16316 V 40526 5.00 2