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(
    IF(
      cscart_products_categories.link_type = 'M', 
      CONCAT(
        cscart_products_categories.category_id, 
        'M'
      ), 
      cscart_products_categories.category_id
    )
  ) as category_ids, 
  popularity.total as popularity, 
  IF(
    shared_prices.product_id IS NOT NULL, 
    MIN(
      IF(
        shared_prices.percentage_discount = 0, 
        shared_prices.price, 
        shared_prices.price - (
          shared_prices.price * shared_prices.percentage_discount
        )/ 100
      )
    ), 
    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, 
  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, 
  cscart_discussion.type as discussion_type 
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_ult_product_prices shared_prices ON shared_prices.product_id = cscart_products.product_id 
  AND shared_prices.company_id = 2 
  AND shared_prices.lower_limit = 1 
  AND shared_prices.usergroup_id IN (0, 0, 1) 
  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.company_id = 2 
  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 = 899 
  LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = 10013 
  AND cscart_seo_names.type = 'p' 
  AND cscart_seo_names.dispatch = '' 
  AND cscart_seo_names.lang_code = 'en' 
  AND cscart_seo_names.company_id = 2 
  LEFT JOIN cscart_discussion ON cscart_discussion.object_id = cscart_products.product_id 
  AND cscart_discussion.object_type = 'P' 
  AND cscart_discussion.company_id = 2 
WHERE 
  cscart_products.product_id = 10013 
  AND (
    companies.status = 'A' 
    OR cscart_products.company_id = 0
  ) 
GROUP BY 
  cscart_products.product_id

Query time 0.00158

Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE cscart_products const PRIMARY,status,product_id_idx,status_idx PRIMARY 3 const 1
1 SIMPLE popularity const PRIMARY,total PRIMARY 3 const 1
1 SIMPLE cscart_product_sales const PRIMARY,pa PRIMARY 6 const,const 1
1 SIMPLE cscart_product_prices ref usergroup,product_id,lower_limit,usergroup_id product_id 3 const 1 Using where
1 SIMPLE cscart_product_descriptions const PRIMARY,product_id PRIMARY 9 const,const 1 Using where
1 SIMPLE shared_prices range usergroup,product_id,company_id,lower_limit,usergroup_id usergroup 13 2 Using where; Using join buffer (flat, BNL join)
1 SIMPLE companies eq_ref PRIMARY PRIMARY 4 const 1 Using where
1 SIMPLE cscart_products_categories ref PRIMARY,pt,product_id_idx,category_id_idx,product_category_idx,category_product_idx pt 3 const 9
1 SIMPLE cscart_categories eq_ref PRIMARY,c_status,p_category_id,idx_category_id PRIMARY 3 mahm3t_cs443.cscart_products_categories.category_id 1 Using where
1 SIMPLE cscart_seo_names const PRIMARY,dispatch PRIMARY 210 const,const,const,const,const 1 Using where
1 SIMPLE cscart_discussion const object_id,company_id object_id 10 const,const,const 1 Using where

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 shipping_availability_id ms_type master_id unit_price aval_status facebook_obj_type cp_additinal_product_enabled cp_additinal_product_items cp_delivery_date youtube_link show_youtube_video replace_main_image size_chart_id staff_notes emo_pn emo_paczka emo_dostawca emo_kreskowy emo_nrdostawcy emo_uwagi emo_source lang_code product shortname short_description full_description meta_keywords meta_description search_words page_title age_warning_message unit_name promo_text stop_words amp_description custom_header price category_ids popularity company_name sales_amount seo_name seo_path discussion_type
10013 fak-ak-amz-solar P A 1 0.00 0.00 0.000 0 0 0 0.00 0 1460192679 1743601045 0 N N N O N R N N N Y 10 0 N 0 0 0 0 6 N 0 P F default 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 N 0 0 0 activity Y {"679299028":{"product_id":"716","amount":"0","modifier":"0","modifier_type":"A"}} 0 N N 0 07.07.2022 mk - akt zdjęć 17.08.2022 mk - akt opisu 0 en FAKRO AMZ SOLAR | solar-powered awnign blind for FAKRO roof windows ✓ OptiLight ✓ ARON ✓ ARTENS <h2>AMZ: awning blind for Fakro centre-pivot and top-hung-and-pivot roof windows</h2> <p style="text-align: justify;">The awning blind provides optimum protection from overheating while, at the same time providing a view to the outside. Fakro awning blind reflects sun rays before they reach the glass and thus protects against heat build-up on sunny days, providing relief for the eyes and protection from the harmful effects of strong reflected light, which is especially important when working with computers.</p> <p style="text-align: center;"><img alt="" src="/images/products/fakro_amz_all_3_en.jpg" style="width: 500px; height: 100px;" /></p> <p style="text-align: justify;">The awning blind<strong> AMZ</strong>&nbsp;is made of durable, weather- resistant fibre glass fabric. The fabric is roller mounted, spring loaded and fitted inside an aluminium casing which is installed at the top of the window. This enables easy control of the blind and makes it possible to use a wider fabric, thus providing additional protection against ingress of light.</p> <p style="text-align: center;"><img alt="" src="/images/products/fakro_amz_heat_protection_en.jpg" style="width: 500px; height: 201px;" /></p> <h2>Important information</h2> <ul style="text-align: justify; background: #00cc99"> <li>Awning blind <strong>AMZ Solar</strong> is designed for centre-pivot and top-hung-and-pivot windows.</li> <li><strong>AMZ Solar</strong> is powered by solar batteries</li> <li><strong>The remote control is not included</strong>.</li> </ul> <h2>Characteristic:</h2> <ul style="text-align: justify;"> <li>the best protection from the heat;</li> <li>effective shading of the room whilst still allowing some light in;</li> <li>comfortable use – we can cover the window for a whole summer without the need to roll it up and down every day;</li> <li>easy installation – we install the blind from the inside (unscrew four screws and then rescrew them again in the same holes);</li> <li>protection from harmful UV radiation,when used in rainy weather, reduces noise of rain and hailstones.</li> </ul> <h2>Size</h2> <table border="1" bordercolor="#00cc99" rules="typ"> <tbody> <tr> <td colspan="2" rowspan="1" style="text-align: center;"><strong>Warning!</strong></td> </tr> <tr> <td style="text-align: justify; width: 312px; height: 142px;">The size of e.g. 78x140 cm applies to roof window's size! The blind itself is smaller. Window's size can be found on the nameplate located at the top of the window. There is no need to measeure the window. Just read the size from the nameplate and order accessories in the corresponding size.</td> <td style="text-align: justify; width: 188px; height: 142px;"><img alt="" src="images/products/fakro_nameplate_animated.gif" /></td> </tr> </tbody> </table> <h2>Available fabrics of awning blind for FAKRO roof windows:</h2> <ul style="text-align: justify;"> <li>relative fabric transparency = 10%</li> </ul> <center> <p style="text-align: center;"><img alt="" src="/images/products/fakro/sun_prot/amz/fakro_amz_gr1.jpg" /></p> </center> <ul style="text-align: justify;"> <li>relative fabric transparency = 1%</li> </ul> <center> <p style="text-align: center;"><img alt="" src="/images/products/fakro/sun_prot/amz/fakro_amz_gr2.jpg" /></p> </center> <h2>Control devices for FAKRO Z-Wave / SOLAR products</h2> <h3>Kindly note: the product is sold separately!</h3> <p style="text-align: justify;">The products listed below are not delivered with a roof window, shutters or blinds. They are sold separately so that each customer can choose the product that best suits their needs.</p> <div style="overflow-x:auto;"> <table> <tbody> <tr> <td style="text-align: right;" width="20%">Product name:</td> <td style="text-align: center;" width="20%"><strong>ZRH1</strong></td> <td style="text-align: center;" width="20%"><strong>ZRH12</strong></td> <td style="text-align: center;" width="20%"><strong>ZRW7</strong></td> <td style="text-align: center;" width="20%"><strong>ZRS24</strong></td> </tr> <tr> <td style="text-align: right;">Device type:</td> <td style="text-align: center;">one-channel remote control</td> <td style="text-align: center;">multi-channel remote control</td> <td style="text-align: center;">wireless, multi-channel wall keyboard</td> <td style="text-align: center;">multi-channel remote control</td> </tr> <tr> <td style="text-align: right;">-</td> <td style="text-align: center;"><img src="/images/products/fakro/electric/fakro_ZRH1.png" /></td> <td style="text-align: center;"><img src="/images/products/fakro/electric/fakro_ZRH12.jpg" /></td> <td style="text-align: center;"><img src="/images/products/fakro/electric/fakro_ZWR7.jpg" /></td> <td style="text-align: center;"><img src="/images/products/fakro/electric/fakro_ZRS24.jpg" /></td> </tr> <tr> <td style="text-align: right;">Compatibility with FAKRO Z-WAVE products:</td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> </tr> <tr> <td style="text-align: right;">Compatibility with FAKRO SOLAR products:</td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> </tr> <tr> <td style="text-align: right;">Amount of supported devices:</td> <td style="text-align: center;">up to 12 devices in one group</td> <td style="text-align: center;">do 12 urządzeń w każdej z 12 grup</td> <td style="text-align: center;">up to 12 devices in each of the 7 groups</td> <td style="text-align: center;">up to 24 devices in each of the 24 groups</td> </tr> <tr> <td style="text-align: right;">"PLACE" function:</td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span><br /> up to 24 devices in each of the 24 places</td> </tr> <tr> <td style="text-align: right;">"SCENE" function:</td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span><br /> up to 24 sceens</td> </tr> <tr> <td colspan="5" style="text-align: center;">Appearance information</td> </tr> <tr> <td style="text-align: right;">Available in white:</td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> </tr> <tr> <td style="text-align: right;">Available in black:</td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> </tr> <tr> <td style="text-align: right;">Dimensions:</td> <td style="text-align: center;">48x125x17 mm</td> <td style="text-align: center;">48x125x17 mm</td> <td style="text-align: center;">80x80x20 mm</td> <td style="text-align: center;">52x180x20 mm</td> </tr> <tr> <td colspan="5" style="text-align: center;">Technical data</td> </tr> <tr> <td style="text-align: right;">LCD display:</td> <td style="text-align: center;">-</td> <td style="text-align: center;">-</td> <td style="text-align: center;">-</td> <td style="text-align: center;">240x320 px</td> </tr> <tr> <td style="text-align: right;">Radio protocol:</td> <td style="text-align: center;">Z-Wave</td> <td style="text-align: center;">Z-Wave</td> <td style="text-align: center;">Z-Wave</td> <td style="text-align: center;">Z-Wave</td> </tr> <tr> <td style="text-align: right;">Power supply:</td> <td style="text-align: center;">2x batteries AAA</td> <td style="text-align: center;">2x batteries AAA</td> <td style="text-align: center;">4x batteries AAA</td> <td style="text-align: center;">3x batteries AKU AAA</td> </tr> <tr> <td style="text-align: right;">USB charging possible:</td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: red;"><big>✕</big></span></td> <td style="text-align: center;"><span style="color: green;"><big>✓</big></span></td> </tr> <tr> <td style="text-align: right;">Working temperature:</td> <td style="text-align: center;">from +5°C to +40°C</td> <td style="text-align: center;">from +5°C to +40°C</td> <td style="text-align: center;">from 0°C to +40°C</td> <td style="text-align: center;">from +5°C to +40°C</td> </tr> </tbody> </table> </div> <p style="text-align:center"><strong>Finding out the right size</strong></p><p style="text-align:center"><img src="/images/products/fakro_nameplate_animated.gif" /></p><p style="text-align:center"><small>The size (e.g. 78/118) refers to the outer dimensions of the roof window! The blind itself is smaller.</small></p> 1899.000000 359,986,994 124966 baubaY.de 5 fakro-solar-powered-awning-blind-amz-solar 261/901/994 B