SELECT 
  products.*, 
  product_descriptions.*, 
  MIN(
    IF(
      product_prices.percentage_discount = 0, 
      product_prices.price, 
      product_prices.price - (
        product_prices.price * product_prices.percentage_discount
      )/ 100
    )
  ) as price, 
  GROUP_CONCAT(
    CASE WHEN (
      products_categories.link_type = 'M'
    ) THEN CONCAT(
      products_categories.category_id, 
      'M'
    ) ELSE products_categories.category_id END 
    ORDER BY 
      categories.storefront_id IN (0, 1) DESC, 
      (
        products_categories.link_type = 'M'
      ) DESC, 
      products_categories.category_position ASC, 
      products_categories.category_id ASC
  ) as category_ids, 
  popularity.total as popularity, 
  company_descr.i18n_company as company_name, 
  cd.terms, 
  seo_names.name as seo_name, 
  seo_names.path as seo_path, 
  company_descriptions.company_description, 
  discussion.type as discussion_type 
FROM 
  products 
  LEFT JOIN product_prices ON product_prices.product_id = products.product_id 
  AND product_prices.lower_limit = 1 
  AND product_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN product_descriptions ON product_descriptions.product_id = products.product_id 
  AND product_descriptions.lang_code = 'en' 
  LEFT JOIN company_descriptions as company_descr ON company_descr.company_id = products.company_id 
  AND company_descr.lang_code = 'en' 
  LEFT JOIN companies as companies ON companies.company_id = products.company_id 
  INNER JOIN products_categories ON products_categories.product_id = products.product_id 
  INNER JOIN categories ON categories.category_id = products_categories.category_id 
  AND categories.storefront_id IN (0, 1) 
  AND (
    categories.usergroup_ids = '' 
    OR FIND_IN_SET(0, categories.usergroup_ids) 
    OR FIND_IN_SET(1, categories.usergroup_ids)
  ) 
  AND (
    products.usergroup_ids = '' 
    OR FIND_IN_SET(0, products.usergroup_ids) 
    OR FIND_IN_SET(1, products.usergroup_ids)
  ) 
  AND categories.status IN ('A', 'H') 
  AND products.status IN ('A', 'H') 
  LEFT JOIN product_popularity as popularity ON popularity.product_id = products.product_id 
  LEFT JOIN company_descriptions AS cd ON cd.company_id = products.company_id 
  AND cd.lang_code = 'en' 
  LEFT JOIN seo_names ON seo_names.object_id = 61581 
  AND seo_names.type = 'p' 
  AND seo_names.dispatch = '' 
  AND seo_names.lang_code = 'en' 
  LEFT JOIN company_descriptions AS company_descriptions ON company_descriptions.company_id = products.company_id 
  AND company_descriptions.lang_code = 'en' 
  LEFT JOIN discussion ON discussion.object_id = products.product_id 
  AND discussion.object_type = 'P' 
WHERE 
  products.product_id = 61581 
  AND (
    companies.status IN ('A') 
    OR products.company_id = 0
  ) 
GROUP BY 
  products.product_id

Query time 0.00325

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "6.13"
    },
    "grouping_operation": {
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "products",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "status",
              "idx_company_id",
              "idx_usergroup_ids"
            ],
            "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.10",
              "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",
              "weight_lbs",
              "weight_oz",
              "product_tax_code",
              "deleted_at",
              "archived_at",
              "position"
            ]
          }
        },
        {
          "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.10",
              "prefix_cost": "0.00",
              "data_read_per_join": "32"
            },
            "used_columns": [
              "product_id",
              "total"
            ]
          }
        },
        {
          "table": {
            "table_name": "cd",
            "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.10",
              "prefix_cost": "0.00",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "company_id",
              "lang_code",
              "terms"
            ]
          }
        },
        {
          "table": {
            "table_name": "product_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": "0.40",
              "eval_cost": "0.10",
              "prefix_cost": "0.50",
              "data_read_per_join": "24"
            },
            "used_columns": [
              "product_id",
              "price",
              "percentage_discount",
              "lower_limit",
              "usergroup_id"
            ],
            "attached_condition": "<if>(is_not_null_compl(product_prices), ((`goimagine`.`product_prices`.`lower_limit` = 1) and (`goimagine`.`product_prices`.`usergroup_id` in (0,0,1))), true)"
          }
        },
        {
          "table": {
            "table_name": "product_descriptions",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "product_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id",
              "lang_code"
            ],
            "key_length": "11",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.64",
              "eval_cost": "0.10",
              "prefix_cost": "1.24",
              "data_read_per_join": "5K"
            },
            "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",
              "cls_stop_words",
              "how_its_made",
              "custom_header"
            ]
          }
        },
        {
          "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.89",
              "eval_cost": "0.10",
              "prefix_cost": "2.24",
              "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.68",
              "eval_cost": "0.10",
              "prefix_cost": "3.02",
              "data_read_per_join": "14K"
            },
            "used_columns": [
              "company_id",
              "status"
            ],
            "attached_condition": "<if>(found_match(companies), ((`goimagine`.`companies`.`status` = 'A') or false), true)"
          }
        },
        {
          "table": {
            "table_name": "products_categories",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "pt"
            ],
            "key": "pt",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 4,
            "rows_produced_per_join": 4,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.00",
              "eval_cost": "0.40",
              "prefix_cost": "4.42",
              "data_read_per_join": "64"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type",
              "category_position"
            ]
          }
        },
        {
          "table": {
            "table_name": "categories",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "goimagine.products_categories.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "1.00",
              "eval_cost": "0.02",
              "prefix_cost": "5.82",
              "data_read_per_join": "536"
            },
            "used_columns": [
              "category_id",
              "usergroup_ids",
              "status",
              "storefront_id"
            ],
            "attached_condition": "((`goimagine`.`categories`.`storefront_id` in (0,1)) and ((`goimagine`.`categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`goimagine`.`categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`goimagine`.`categories`.`usergroup_ids`))) and (`goimagine`.`categories`.`status` in ('A','H')))"
          }
        },
        {
          "table": {
            "table_name": "seo_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.17",
              "eval_cost": "0.02",
              "prefix_cost": "6.01",
              "data_read_per_join": "347"
            },
            "used_columns": [
              "name",
              "object_id",
              "type",
              "dispatch",
              "path",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "company_descriptions",
            "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.04",
              "eval_cost": "0.02",
              "prefix_cost": "6.08",
              "data_read_per_join": "355"
            },
            "used_columns": [
              "company_id",
              "lang_code",
              "company_description"
            ]
          }
        },
        {
          "table": {
            "table_name": "discussion",
            "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.04",
              "eval_cost": "0.02",
              "prefix_cost": "6.13",
              "data_read_per_join": "4"
            },
            "used_columns": [
              "object_id",
              "object_type",
              "type"
            ]
          }
        }
      ]
    }
  }
}

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 weight_lbs weight_oz product_tax_code deleted_at archived_at position lang_code product shortname short_description full_description meta_keywords meta_description search_words page_title age_warning_message promo_text cls_stop_words how_its_made custom_header price category_ids popularity company_name terms seo_name seo_path company_description discussion_type
61581 KCK-0053 P A 1680 8.00 5 0.500 0 0 0 0.00 0 1612561121 1649874011 0 N N N B N R N N N Y 10 0 S 0 0 0 0 N 0 P F 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;} 0.000 0.000 2147483647 en Unicorn Valentines Day Card Set DIY Craft Kit <p>These fun wooden&nbsp;Valentine's Day Card cutouts are great for kids of all ages who love to color! They can be colored with markers, colored pencils, crayons, or even painted!&nbsp;&nbsp;</p> <p class="text-center"><span style="color: rgb(31, 73, 125);">&nbsp;<strong>Unicorn Valentines Day Card Set DIY Craft Kit&nbsp;</strong></span></p> <p>Coloring time just got an upgrade!</p> <p>Pick which Kit Set works best for your child.&nbsp;</p> <p><br></p> <p><strong>KIT SET OPTIONS:&nbsp;</strong><br>- Cutouts (NO coloring extras)&nbsp;<br>- Cutouts + Markers (8 colors)<br>- Cutouts + Paint (8 Colors)<br>- Cutouts + Crayons (24 colors)</p> <p><br></p> <p>Cutout shapes are approx. 1/8 inch thick.&nbsp;&nbsp;</p> <p><br></p> <p><strong>Cutout Shapes Included:</strong><br>- Set of 5 Cards<br>- Card 1 - 5.5 x 3.25 inches approx.<br>- Card 2 - 5 x 4.5 inches approx.<br>- Card 3 - 4 x 5.25 inches approx.<br>- Card 4 - 5.25 x 3.5 inches approx.<br>- Card 5 - 3.5 x 4.5 inches approx.</p> <p><br></p> <p>These fun wooden cutouts are great for kids of all ages who love to color! They can be colored with markers, colored pencils, crayons, or even painted!&nbsp;&nbsp;</p> <p><br></p> <p>Make them into magnets (not included), decorate a room, or any other creative idea you can come up with!&nbsp;&nbsp;</p> <p><br></p> <p>Knots and blemishes are not a flaw in the wood, but part of the beauty of each piece of wood.&nbsp; &nbsp;Every cutout is unique and the cutouts you may receive might look slightly different than the one in the picture.&nbsp;&nbsp;</p> <p><br></p> <p>My kids LOVE coloring these wooden cutouts! Now your kids can get in on the fun too!!&nbsp;</p> <p><br></p> <p><br></p> <p>Thanks for visiting my shop!! Please contact me if you have any questions. Check back for new items!!</p> <p><br></p> <p>Sign up for my VIP list and receive a 20% OFF COUPON and exclusive specials!&nbsp;<br></p> <p>bit.ly/JSDSubscribe<br></p><p><br></p> These fun wooden Valentine's Day Card cutouts are great for kids of all ages who love to color! They can be colored with markers, colored pencils, crayons, or even painted! wood cutout, DIY Crafts, Kids craft kit, coloring paintable, color paint marker, unfinished shape, wood cut out, Kid arts craft, markers, paint, crayon, Dino Dinosaur, Animal, dinosaur DIY crafts, DIY Unicorn Valentines Day Card Set DIY Craft Kit 8.00000000 110M,75,818,1704 2453 Juls Sweet Designs <p><span style="color: rgb(34, 34, 34); font-size: 24px; font-weight: 700;">Returns & exchanges</span></p> <h6>I gladly accept cancellations</h6> <p>Request a cancellation within: 2 hours of purchase</p> <h6>I don't accept returns or exchanges</h6> <p>But please contact me if you have any problems with your order.</p> <h4></h4> <h5>Frequently asked questions</h5> <h6>Return and Exchange Details - Shop policies</h6> <p>All items are sold as-is, no refunds or returns. If there is any problem with your order, I will be happy to work with each individual buyer.<br><br>Custom Orders: Once purchased all sales are FINAL. Custom order items may not be canceled.</p> <h6>Where's my Personalization Proof? - Shop policies</h6> <p>A proof will be sent to you via email for the personalized products you've purchased. Proofs will be sent within 48 BUSINESS hours after payment is cleared.<br><br>Only once you approve the design(s) will the order be printed. Because the products are approved, by you, and are personalized for you, no refunds will be granted AFTER the first proof is sent.</p> <h6>What happens to unapproved proofs? - Shop policies</h6> <p>Unapproved Proofs:<br><br>After I have sent the 1st proof and if you do not reply back, I will send several reminder messages to check in on you.<br><br>After 1 month, and if you have not responded back, I will automatically COMPLETE your order. Your order will be marked as shipped. You will receive a shipping notice that will have a note saying you need to approve your design if you would like to have your item finished and shipped. I will not send any more reminders after this.<br><br>Once you approve your design, I will ship your item posted in my turn around time.</p> <h6>What are your Business Hours?</h6> <p>BUSINESS HOURS:<br>Monday – Friday (working hours vary due to life with 3 kids, and homeschooling)<br><br>*I will be closed on holidays<br><br>If you don't reply to the message or email right away, please don't think I'm ignoring you! I'm problem away from my computer at the moment taking care of my family.<br><br>Don't worry, I will get back to you as soon as I can!</p> <h6>Do you offer a discount?</h6> <p>Yes, I do!<br><br>Please take a look at my welcome message in my shop! I post my most up to date coupon codes there!<br><br>Here's a taste of what you can find in the welcome message!<br><br>Sign up for mailing list and receive a 20% Off Coupon and exclusive specials!<br><a href="http://eepurl.com/grKzn9">http://eepurl.com/grKzn9</a><br><br><br><br>Happy Shopping!!</p> <h6>What is the turnaround time?</h6> <p>CURRENT PROOF TURNAROUND TIME: (starts once payment clears)<br>Proofs: up to 48 Business Hours<br>Extra proofs: less than 24 Business Hours<br><br><br>LASER CUT/ENGRAVED Items:<br>All items will be shipped within 3-5 BUSINESS days of order and payment. (If the item is a PERSONALIZED ITEM – Production will start AFTER Proof has been approved.)</p> <h6>Can I use a coupon on a Custom-Designed Item?</h6> <p>Unfortunately, due to the extra time, attention to detail, and dedicated conversation on the design for a custom-designed item, custom-designed items are not eligible for any discounts or coupons.</p> unicorn-valentines-day-card-set-diy-craft-kit 109/110 <p></p> <p><b>I love my job of being a Wife and a Mommy!</b></p> <p>I have been blessed with a wonderful husband and two handsome&nbsp;boys and a cute little girl. I am learning that the longer I’m married, the more I fall in love with my husband. He truly is a blessing in my life.</p> <p>I enjoy cooking, crocheting, sewing, knitting, reading and even some digital designing.</p> <p><i>I keep busy being a wife, mommy, homeschooling, and operating JulsSweetDesigns & JulsSweetCuts, but I’m thankful for every minute.</i></p> <p><i>God has blessed me with a great family and the passion and enjoyment to make/sew/design items not only for my family but also for others.</i></p> D