SELECT 
  cscart_products.*, 
  cscart_product_descriptions.*, 
  MIN(
    IF(
      cscart_product_prices.percentage_discount = 0, 
      cscart_product_prices.price, 
      cscart_product_prices.price - (
        cscart_product_prices.price * cscart_product_prices.percentage_discount
      )/ 100
    )
  ) as price, 
  GROUP_CONCAT(
    CASE WHEN (
      cscart_products_categories.link_type = 'M'
    ) THEN CONCAT(
      cscart_products_categories.category_id, 
      'M'
    ) ELSE cscart_products_categories.category_id END 
    ORDER BY 
      cscart_categories.storefront_id IN (0, 1) DESC, 
      (
        cscart_products_categories.link_type = 'M'
      ) DESC, 
      cscart_products_categories.category_position ASC, 
      cscart_products_categories.category_id ASC
  ) as category_ids, 
  popularity.total as popularity, 
  companies.company as company_name, 
  cscart_product_sales.amount as sales_amount, 
  cscart_seo_names.name as seo_name, 
  cscart_seo_names.path as seo_path, 
  MIN(point_prices.point_price) as point_price, 
  cscart_discussion.type as discussion_type, 
  cscart_product_review_prepared_data.average_rating average_rating, 
  cscart_product_review_prepared_data.reviews_count product_reviews_count 
FROM 
  cscart_products 
  LEFT JOIN cscart_product_prices ON cscart_product_prices.product_id = cscart_products.product_id 
  AND cscart_product_prices.lower_limit = 1 
  AND cscart_product_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN cscart_product_descriptions ON cscart_product_descriptions.product_id = cscart_products.product_id 
  AND cscart_product_descriptions.lang_code = 'en' 
  LEFT JOIN cscart_companies as companies ON companies.company_id = cscart_products.company_id 
  INNER JOIN cscart_products_categories ON cscart_products_categories.product_id = cscart_products.product_id 
  INNER JOIN cscart_categories ON cscart_categories.category_id = cscart_products_categories.category_id 
  AND cscart_categories.storefront_id IN (0, 1) 
  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_products.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_products.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_products.usergroup_ids
    )
  ) 
  AND cscart_categories.status IN ('A', 'H') 
  AND cscart_products.status IN ('A', 'H') 
  LEFT JOIN cscart_product_popularity as popularity ON popularity.product_id = cscart_products.product_id 
  LEFT JOIN cscart_product_sales ON cscart_product_sales.product_id = cscart_products.product_id 
  AND cscart_product_sales.category_id = 296 
  LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = 495 
  AND cscart_seo_names.type = 'p' 
  AND cscart_seo_names.dispatch = '' 
  AND cscart_seo_names.lang_code = 'en' 
  LEFT JOIN cscart_product_point_prices as point_prices ON point_prices.product_id = cscart_products.product_id 
  AND point_prices.lower_limit = 1 
  AND point_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN cscart_discussion ON cscart_discussion.object_id = cscart_products.product_id 
  AND cscart_discussion.object_type = 'P' 
  LEFT JOIN cscart_product_review_prepared_data ON cscart_product_review_prepared_data.product_id = cscart_products.product_id 
  AND cscart_product_review_prepared_data.storefront_id = 0 
WHERE 
  cscart_products.product_id = 495 
  AND (
    companies.status IN ('A') 
    OR cscart_products.company_id = 0
  ) 
GROUP BY 
  cscart_products.product_id

Query time 0.00139

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "1.84"
    },
    "grouping_operation": {
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_products",
            "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",
              "facebook_obj_type",
              "parent_product_id",
              "buy_now_url",
              "units_in_product",
              "show_price_per_x_units",
              "is_mobilede",
              "seller_id",
              "mdc_product_id"
            ]
          }
        },
        {
          "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_product_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_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": 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": "16"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type",
              "category_position"
            ]
          }
        },
        {
          "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": [
              "danishecarter_latest.cscart_products_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": "1.40",
              "data_read_per_join": "172"
            },
            "used_columns": [
              "category_id",
              "storefront_id",
              "usergroup_ids",
              "status"
            ],
            "attached_condition": "((`danishecarter_latest`.`cscart_categories`.`storefront_id` in (0,1)) and ((`danishecarter_latest`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`danishecarter_latest`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`danishecarter_latest`.`cscart_categories`.`usergroup_ids`)) and (`danishecarter_latest`.`cscart_categories`.`status` in ('A','H')))"
          }
        },
        {
          "table": {
            "table_name": "cscart_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": 2,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.10",
              "eval_cost": "0.02",
              "prefix_cost": "1.52",
              "data_read_per_join": "2"
            },
            "used_columns": [
              "product_id",
              "price",
              "percentage_discount",
              "lower_limit",
              "usergroup_id"
            ],
            "attached_condition": "<if>(is_not_null_compl(cscart_product_prices), ((`danishecarter_latest`.`cscart_product_prices`.`lower_limit` = 1) and (`danishecarter_latest`.`cscart_product_prices`.`usergroup_id` in (0,0,1))), true)"
          }
        },
        {
          "table": {
            "table_name": "cscart_product_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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.02",
              "prefix_cost": "1.54",
              "data_read_per_join": "467"
            },
            "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": "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.02",
              "prefix_cost": "1.56",
              "data_read_per_join": "789"
            },
            "used_columns": [
              "company_id",
              "status",
              "company"
            ],
            "attached_condition": "<if>(found_match(companies), ((`danishecarter_latest`.`companies`.`status` = 'A') or 0), true)"
          }
        },
        {
          "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.10",
              "eval_cost": "0.02",
              "prefix_cost": "1.68",
              "data_read_per_join": "173"
            },
            "used_columns": [
              "name",
              "object_id",
              "type",
              "dispatch",
              "path",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "point_prices",
            "access_type": "range",
            "possible_keys": [
              "unique_key",
              "src_k"
            ],
            "key": "unique_key",
            "used_key_parts": [
              "lower_limit",
              "usergroup_id",
              "product_id"
            ],
            "key_length": "8",
            "rows_examined_per_scan": 2,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "using_join_buffer": "Block Nested Loop",
            "cost_info": {
              "read_cost": "0.10",
              "eval_cost": "0.02",
              "prefix_cost": "1.80",
              "data_read_per_join": "2"
            },
            "used_columns": [
              "product_id",
              "point_price",
              "lower_limit",
              "usergroup_id"
            ],
            "attached_condition": "(<if>(found_match(point_prices), 1, true) and <if>(is_not_null_compl(point_prices), ((`danishecarter_latest`.`point_prices`.`lower_limit` = 1) and (`danishecarter_latest`.`point_prices`.`product_id` = 495) and (`danishecarter_latest`.`point_prices`.`usergroup_id` in (0,0,1))), true))"
          }
        },
        {
          "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.02",
              "prefix_cost": "1.82",
              "data_read_per_join": "2"
            },
            "used_columns": [
              "object_id",
              "object_type",
              "type"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_product_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.02",
              "prefix_cost": "1.84",
              "data_read_per_join": "1"
            },
            "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 facebook_obj_type parent_product_id buy_now_url units_in_product show_price_per_x_units is_mobilede seller_id mdc_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 price category_ids popularity company_name sales_amount seo_name seo_path point_price discussion_type average_rating product_reviews_count
495 mdc_1145837 P A 4 66072.96 1 0.000 0 0 0 0.00 0 1743749506 1743749506 0 N N N N N N N Y 10 0 N N 0 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 0.000 1.000 Y 1819 1145837 en ALPINA 3.0 Allrad Touring **Seit 1968 und mittlerweile in der 2. Generation,** bieten wir unseren Kunden mitten in Bielefeld eine große Auswahl an günstigen EU- Neuwagen an. <br><br>Auf unserer **Homepage www.auto-owl.de** finden Sie eine große Auswahl an **Lagerfahrzeugen** und **kurzfristig verfügbaren Fahrzeugen** sowie die Möglichkeit **Bestellfahrzeuge** nach Ihren Wünschen zu konfigurieren. Bei uns erhalten Sie **volle Leistung** rund um Ihren neuen EU-Neuwagen, von der **attraktiven Autofinanzierung** über die **Inzahlungnahme** bis hin zur **Zulassung** , alles aus einer Hand ohne versteckte Kosten. Denn unsere Angebote verstehen sich inkl. Mehrwertsteuer inkl. Überführungskosten und Aufbereitung sowie aller benötigten Fahrzeugunterlagen für die Zulassung.<br><br><br><br>Weitere Bilder sowie eine detaillierte Fahrzeugbeschreibung finden Sie auf unserer Homepage www.auto-owl.de. Teilweise Beispielbilder mit Sonderausstattung. Irrtümer, Änderungen und Zwischenverkauf vorbehalten.<br><br><br><br> **Seit 1968 und mittlerweile in der 2. Generation,** bieten wir unseren Kunden mitten in Bielefeld eine große Auswahl an günstigen EU- Neuwagen an.<br><br>Auf unserer **Homepage www.auto-owl.de** finden Sie eine große Auswahl an **Lagerfahrzeugen** und **kurzfristig verfügbaren Fahrzeugen** sowie die Möglichkeit **Bestellfahrzeuge** nach Ihren Wünschen zu konfigurieren. Bei uns erhalten Sie **volle Leistung** rund um Ihren neuen EU-Neuwagen, von der **attraktiven Autofinanzierung** über die **Inzahlungnahme** bis hin zur **Zulassung** , alles aus einer Hand ohne versteckte Kosten. Denn unsere Angebote verstehen sich inkl. Mehrwertsteuer inkl. Überführungskosten und Aufbereitung sowie aller benötigten Fahrzeugunterlagen für die Zulassung.<br><br><br><br>Weitere Bilder sowie eine detaillierte Fahrzeugbeschreibung finden Sie auf unserer Homepage www.auto-owl.de. Teilweise Beispielbilder mit Sonderausstattung. Irrtümer, Änderungen und Zwischenverkauf vorbehalten.<br><br>Brabus-Tuning, Antriebsart *: Verbrennungsmotor (ICE)<br><br><br><br> **Ausstattungen:** <br><br><br><br> **Innen** <br><br>* Armlehne für Rücksitze<br><br>* Armlehne für Vordersitze<br><br>* Elektr. Sitz-Memory für Außenspiegel<br><br>* Elektrische Fensterheber mit Impulsschaltung für zwei Fenster vorn und hinten<br><br>* Fahrersitz Sportsitz mit fünf elektr. Verstellmöglichkeiten, Sitzheizung, Lehnenneigungsverstellung mit Memory, Längsverstellung mit Memory, Längsverstellung mit Memory, Sitzflächenneigungsverstellung mit Memory und mechanischer Oberschenkelauflage, Beifahrersitz Sportsitz mit fünf elektr. Verstellmöglichkeiten, Sitzheizung, elektrischer Lehnenneigungsverstellung, elektrischer Längsverstellung, elektrischer Höhenverstellung, elektrischer Sitzflächenneigungsverstellung und mechanischer Oberschenkelauflage<br><br>* Fernbedienbare Heckklappenfernentriegelung<br><br>* Fünf Sitzplätze mit Sitzkonfiguration: 2+3<br><br>* Fußmatten<br><br>* Gepäckraumbeleuchtung<br><br>* Gepäckraumvolumen: normal (l): 500 und bei umgelegter Rückbank bis zur Dachkante (l): 1.510<br><br>* Gepäcksicherung<br><br>* Gepäcksicherungsnetz<br><br>* Getränkehalter für Vordersitze und Rücksitze<br><br>* Getrennte Belüftungsregelung für Beifahrerseite und hinten mit digitaler Anzeige<br><br>* Klimaanlage mit 3 Klimatisierungszonen (vollautomatisch)<br><br>* Konsole am Boden<br><br>* Laderaumabdeckung flexibel<br><br>* Leseleuchten vorne und hinten<br><br>* Luxus-Ausstattung: Klavierlack, Holz oder Holzimitat auf Mittelkonsole, Leder auf Türverkleidungen, Holz oder Holzimitat auf Armaturenbrett<br><br>* Multifunktions-Alu & Lederlenkrad beheizt, höhenverstellbar und längsverstellbar<br><br>* Sitzbank hinten mit drei Sitzplätzen im Verhältnis 40/20/40 umlegbar und fernbedienbar umklappbar<br><br><br><br> **Infotainment & Kommunikation** <br><br>* Audio-Fernbedienung am Lenkrad<br><br>* Außentemperaturanzeige<br><br>* Bluetooth inkl. Telefonbedienung und inkl. Musik Streaming<br><br>* Bordcomputer mit Durchschnittsgeschwindigkeit, Durchschnittskraftstoffverbrauch, momentaner Kraftstoffverbrauch und Reichweite<br><br>* Einparkassistent hinten und vollautomatisches Ein- und Ausparken 90°<br><br>* Geschwindigkeitsbegrenzer<br><br>* Instrumente rekonfigurierbar<br><br>* Media-Anschlüsse USB vorne<br><br>* Multi-Funktions-Monitor mit 12,3 Zoll Bildschirm Instrumente 1 und Bildschirmgröße (cm): 31,2, Multi-Funktions-Monitor mit 10,3 Zoll Bildschirm und Touch-Bedienung Armaturenbrett 1, Touchpad und Bildschirmgröße (cm): 26,2<br><br>* Navigationssystem mit Bedienung über Touch Screen, Datenquelle: Internet (Farbe), 10,3 Zoll-Bildschirm und Verkehrsinformation<br><br>* RDS Audio-Anlage Digitalradio, Touch Screen und Farbdisplay<br><br>* Smart Card / Smart Schlüssel automatisch und inklusive keyless start<br><br>* Sprachbedienung für Radio, für Telefon und für Navigationssystem<br><br>* Startknopf<br><br>* Telematik mit automatischem Notruf, mit SIM im Fahrzeug, Tracking System und Concierge Service<br><br>* Zehn Lautsprecher und Subwoofer<br><br><br><br> **Sicherheit & Assistenz** <br><br>* 2 höhenverstellbare aktive Kopfstützen vorne, 3 höhenverstellbare Kopfstützen hinten<br><br>* Alarmanlage mit Innenraumüberwachung<br><br>* Berganfahrassistent / Auto Hold<br><br>* Cornering brake control<br><br>* Crash Warnsystem aktiviert Bremslicht, Müdigkeitswarnung, automatisches Bremsen, Front und Heck Mindestgeschw. Zur Aktivierung: 5 km/h Fußgängerschutz, visuelle/akustische Warnung<br><br>* Einparkhilfe vorne Radar, Einparkhilfe hinten Radar & Kamera, Einparkhilfe seitlich Radar<br><br>* Fahrer-Airbag intelligent, Beifahrer-Airbag... 66072.96000000 296M 9 demo test mobilede alpina-3-0-allrad-touring 293/296 D