SELECT 
  company_descriptions.*, 
  companies.*, 
  cscart_vendor_plan_descriptions.plan, 
  cscart_seo_names.name as seo_name, 
  cscart_seo_names.path as seo_path, 
  AVG(
    cscart_discussion_rating.rating_value
  ) AS average_rating, 
  CONCAT(
    companies.company_id, 
    '_', 
    IF (
      cscart_discussion_rating.thread_id, 
      cscart_discussion_rating.thread_id, 
      '0'
    )
  ) AS company_thread_ids 
FROM 
  cscart_companies AS companies 
  LEFT JOIN cscart_company_descriptions AS company_descriptions ON company_descriptions.company_id = companies.company_id 
  AND company_descriptions.lang_code = 'en' 
  LEFT JOIN cscart_vendor_plan_descriptions ON companies.plan_id = cscart_vendor_plan_descriptions.plan_id 
  AND cscart_vendor_plan_descriptions.lang_code = 'en' 
  LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = 40 
  AND cscart_seo_names.type = 'm' 
  AND cscart_seo_names.dispatch = '' 
  AND cscart_seo_names.lang_code = 'en' 
  LEFT JOIN cscart_discussion ON cscart_discussion.object_id = companies.company_id 
  AND cscart_discussion.object_type = 'M' 
  LEFT JOIN cscart_discussion_posts ON cscart_discussion_posts.thread_id = cscart_discussion.thread_id 
  AND cscart_discussion_posts.status = 'A' 
  LEFT JOIN cscart_discussion_rating ON cscart_discussion.thread_id = cscart_discussion_rating.thread_id 
  AND cscart_discussion_rating.post_id = cscart_discussion_posts.post_id 
WHERE 
  companies.company_id = 40

Query time 0.00046

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "2.10"
    },
    "nested_loop": [
      {
        "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.10",
            "prefix_cost": "0.00",
            "data_read_per_join": "6K"
          },
          "used_columns": [
            "company_id",
            "status",
            "company",
            "lang_code",
            "address",
            "city",
            "state",
            "country",
            "zipcode",
            "email",
            "phone",
            "url",
            "storefront",
            "secure_storefront",
            "entry_page",
            "redirect_customer",
            "countries_list",
            "timestamp",
            "shippings",
            "logos",
            "request_user_id",
            "request_account_name",
            "request_account_data",
            "tax_number",
            "registered_from_storefront_id",
            "plan_id",
            "pre_moderation",
            "pre_moderation_edit",
            "pre_moderation_edit_vendors",
            "suspend_date",
            "grace_period_start",
            "last_time_suspended",
            "last_debt_notification_time",
            "override_delivery_days",
            "delivery_days",
            "stripe_connect_account_id",
            "stripe_connect_account_type",
            "paypal_commerce_platform_account_id"
          ]
        }
      },
      {
        "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": 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",
            "company_description",
            "terms",
            "i18n_company",
            "i18n_address",
            "i18n_city"
          ]
        }
      },
      {
        "table": {
          "table_name": "cscart_vendor_plan_descriptions",
          "access_type": "const",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "plan_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": "792"
          },
          "used_columns": [
            "plan_id",
            "lang_code",
            "plan"
          ]
        }
      },
      {
        "table": {
          "table_name": "cscart_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": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.25",
            "eval_cost": "0.10",
            "prefix_cost": "0.35",
            "data_read_per_join": "1K"
          },
          "used_columns": [
            "name",
            "object_id",
            "type",
            "dispatch",
            "path",
            "lang_code"
          ]
        }
      },
      {
        "table": {
          "table_name": "cscart_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": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.25",
            "eval_cost": "0.10",
            "prefix_cost": "0.70",
            "data_read_per_join": "24"
          },
          "used_columns": [
            "thread_id",
            "object_id",
            "object_type"
          ]
        }
      },
      {
        "table": {
          "table_name": "cscart_discussion_posts",
          "access_type": "ref",
          "possible_keys": [
            "thread_id",
            "thread_id_2"
          ],
          "key": "thread_id",
          "used_key_parts": [
            "thread_id"
          ],
          "key_length": "3",
          "ref": [
            "wearethehelpful_scalesta_net.cscart_discussion.thread_id"
          ],
          "rows_examined_per_scan": 2,
          "rows_produced_per_join": 2,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.50",
            "eval_cost": "0.20",
            "prefix_cost": "1.40",
            "data_read_per_join": "896"
          },
          "used_columns": [
            "post_id",
            "thread_id",
            "status"
          ],
          "attached_condition": "<if>(is_not_null_compl(cscart_discussion_posts), (`wearethehelpful_scalesta_net`.`cscart_discussion_posts`.`status` = 'A'), true)"
        }
      },
      {
        "table": {
          "table_name": "cscart_discussion_rating",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY",
            "thread_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "post_id"
          ],
          "key_length": "3",
          "ref": [
            "wearethehelpful_scalesta_net.cscart_discussion_posts.post_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 2,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.50",
            "eval_cost": "0.20",
            "prefix_cost": "2.10",
            "data_read_per_join": "32"
          },
          "used_columns": [
            "rating_value",
            "post_id",
            "thread_id"
          ],
          "attached_condition": "<if>(is_not_null_compl(cscart_discussion_rating), (`wearethehelpful_scalesta_net`.`cscart_discussion_rating`.`thread_id` = `wearethehelpful_scalesta_net`.`cscart_discussion`.`thread_id`), true)"
        }
      }
    ]
  }
}

Result

company_id lang_code company_description terms i18n_company i18n_address i18n_city status company address city state country zipcode email phone url storefront secure_storefront entry_page redirect_customer countries_list timestamp shippings logos request_user_id request_account_name request_account_data tax_number registered_from_storefront_id plan_id pre_moderation pre_moderation_edit pre_moderation_edit_vendors suspend_date grace_period_start last_time_suspended last_debt_notification_time override_delivery_days delivery_days stripe_connect_account_id stripe_connect_account_type paypal_commerce_platform_account_id plan seo_name seo_path average_rating company_thread_ids
40 en <p><b>Lighten The Load – Terms & Conditions</b></p> <p><b>1. Introduction</b></p> <p>These Terms and Conditions outline the agreement between Lighten The Load</p> <p>(“we”, “us”, “our”) and the client (“you”, “your”). By booking our services, you agree to</p> <p>these terms.</p> <p><b>2. Services Provided</b></p> <p>Lighten The Load offers home decluttering, organisation, and cleaning services. The</p> <p>specific scope of work will be agreed upon before each booking.</p> <p><b>3. Bookings & Payments</b></p> <p>- All bookings must be confirmed in advance.</p> <p>- Hourly rate: The rate per organiser is £35</p> <p>- Payment of the balance is due upon completion of services unless otherwise</p> <p>agreed.</p> <p>- We accept the following payment methods – cash, bank transfer, PayPal and card</p> <p>payment.</p> <p>-Cancellations within less than 24 hours before the agreed time, we reserve the right</p> <p>to charge up to 50% of the total service fee to cover our preparation and opportunity</p> <p>costs.</p> <p>This policy is fully compliant with your statutory right to cancel under the Consumer</p> <p>Contracts (Information, Cancellation and Additional Charges) Regulations 2013,</p> <p>which entitles you to a 14‑day cooling‑off period for distance and off‑premises</p> <p>services.</p> <p>March 11 2025</p> <p><b>4. Client Responsibilities</b></p> <p>- The Client agrees to provide access to the property at the scheduled time.</p> <p>- Any hazardous materials or unsafe conditions must be disclosed in advance.</p> <p>- While we handle items with care, we are not liable for pre-existing damage or</p> <p>accidental breakages.</p> <p><b>5. Recycling & Donations</b></p> <p>- We will take one car load of recyclable and donated items away per day at no extra</p> <p>charge.</p> <p>- If discarded items exceed this amount, an additional fee will apply, which will be</p> <p>agreed upon before removal.</p> <p><b>6.Photo Consent</b></p> <p>- We may take anonymous before-and-after photos of the areas we organise or</p> <p>clean to showcase our work.</p> <p>- These photos may be used for marketing purposes, including our website, social</p> <p>media, and promotional materials.</p> <p>- No personal or identifiable information (such as faces, names, or addresses) will be</p> <p>included in these photos.</p> <p>- If you do not wish for photos of your space to be used, please inform us in writing</p> <p>before the service begins.</p> <p><b>7. Storage Solutions</b></p> <p>- If additional storage solutions (e.g., boxes, baskets, organisers) are required, we can</p> <p>provide these.</p> <p>- The cost of any storage items will be added to your invoice and discussed with you</p> <p>beforehand.</p> <p><b>8. Liability & Insurance</b></p> <p>- While we take every precaution to deliver a high standard of service, we are not</p> <p>responsible for any loss, damage, or injury resulting from the service.</p> <p>- If required, we recommend you check your home insurance policy for coverage of</p> <p>external service providers.</p> <p><b>9. Complaints & Feedback</b></p> <p>- If you are unhappy with any aspect of our service, please contact us within 48 hours so we</p> <p>can address your concerns.</p> <p>- We value feedback and strive to improve our services based on client experiences</p> <p><b>10. Amendments to Terms</b></p> <p>- Lighten The Load reserves the right to update these Terms & Conditions at any time. The</p> <p>latest version will always be available upon request.</p> <p>Contact Information</p> <p>By booking a service with Lighten The Load, you acknowledge that you have read,</p> <p>understood, and agreed to these Terms & Conditions.</p> <p>For any questions, please contact</p> <p>Sophie on 07958 308013 or</p> <p>Kirstie on 07775 945216, or</p> <p>email us at wecanlightentheload@gmail.com</p> <p><a href="http://www.wecanlightentheload.co.uk">www.wecanlightentheload.co.uk</a></p> Lighten The Load A Lighten The Load wecanlightentheload@gmail.com 07958308013 none Y 1748882125 34 0 a:4:{s:14:"company_fields";a:6:{i:37;s:6:"Sophie";i:38;s:8:"Hamilton";i:53;s:34:"Decluttering and Home Organisation";i:54;s:71:"We sell decluttering and organisation package. The ultimate Group gift.";i:55;s:1420:"Women aged 30–65 • Typically the “project manager” of the household • Values a well-functioning, calm home • Feels overwhelmed by clutter or life transitions • Often juggling work, kids, caring responsibilities, or all three 🧠 Neurodivergent or Mental Health-Aware Clients • Individuals or families with ADHD, autism, anxiety, or executive functioning challenges • Appreciate your trained, patient, and shame-free approach • Need practical systems, not Pinterest perfection 🏠 People in Life Transitions: • Home movers: upsizing, downsizing, or relocating • New parents: nesting, or adjusting to changing family needs • Recently bereaved or divorced: needing gentle support during emotional times • Post-hospital or illness: coming home to a home that needs help catching up 🧺 Busy Professionals or Dual-Income Families • Want to outsource the physical and mental load • Value services that save them time, energy, and decision fatigue 💌 Gift Recipients • Clients who receive Lighten the Load packages through The Helpful Gift Company • Often people others are trying to support discreetly and meaningfully—e.g. new mums, cancer survivors, carers 👩‍🦳 Older Adults & Their Adult Children • Preparing to downsize or make a home safer • Children want a trusted, insured, kind company to help support their parents";i:56;s:47:"Edinburgh, the Lothians, Scottish Borders, Fife";}s:15:"admin_firstname";s:6:"Sophie";s:14:"admin_lastname";s:8:"Hamilton";s:6:"fields";a:0:{}} 1 7 N N N 0 0 0 0 N 0 acct_1RWfCTKv9saXrI1U S LAUNCH - 10% lighten-the-load 40_0