SELECT `codetable`.`general_code`.`name-de` as `relval*flag`, `flowerapp`.`product`.`id` as `product:id`, `flowerapp`.`product`.`agent_id` as `product:agent_id`, `flowerapp`.`product`.`product_type` as `product:product_type`, `flowerapp`.`product`.`title-en` as `product:title-de`, `flowerapp`.`product`.`description-en` as `product:description-de`, `flowerapp`.`product`.`delivery_time_hrs` as `product:delivery_time_hrs`, `flowerapp`.`product`.`delivery_only_in_region` as `product:delivery_only_in_region`, `flowerapp`.`product`.`delivery_mail` as `product:delivery_mail`, `flowerapp`.`product`.`quantity_selection` as `product:quantity_selection`, `flowerapp`.`product`.`flag` as `product:flag`, `flowerapp`.`product`.`is_fleuropProduct` as `product:is_fleuropProduct`, `flowerapp`.`product_media`.`image_source` as `product_media:image_source`, `flowerapp`.`product_media`.`variant_name-en` AS `product_media:price_variant`, `flowerapp`.`product_media`.`id` as `product_media:id`, `pm_2`.`image_source` as `product_media:image_source_2`, `pm_2`.`variant_name-en` AS `product_media:price_variant_2`, `pm_2`.`id` as `product_media:pm_id_2`, `pm_3`.`image_source` as `product_media:image_source_3`, `pm_3`.`variant_name-en` AS `product_media:price_variant_3`, `pm_3`.`id` as `product_media:pm_id_3`, `flowerapp`.`product_price`.`price` as `product_price:price`, CONCAT (`flowerapp`.`product_price`.`variant_name-en`, ' - ', FORMAT(`flowerapp`.`product_price`.`price`, 2)) as `product_price:price_variant`, CONCAT (FORMAT(`flowerapp`.`product_price`.`price`, 2), ' - ', `flowerapp`.`product_price`.`rabatt_percent` ) as `product_price:rabatt_percent`, CONCAT (FORMAT(`flowerapp`.`product_price`.`price`, 2), ' - ', `flowerapp`.`product_price`.`rabatt_amount` ) as `product_price:rabatt_amount` FROM `flowerapp`.`product` LEFT JOIN `flowerapp`.`product_media` ON `flowerapp`.`product`.`id` = `flowerapp`.`product_media`.`product_id` AND `flowerapp`.`product_media`.`sequence` = '0' LEFT JOIN `flowerapp`.`product_media` as `pm_2` ON `flowerapp`.`product`.`id` = `pm_2`.`product_id` AND `pm_2`.`sequence` = '1' LEFT JOIN `flowerapp`.`product_media` as `pm_3` ON `flowerapp`.`product`.`id` = `pm_3`.`product_id` AND `pm_3`.`sequence` = '2' LEFT JOIN `flowerapp`.`product_price` ON `flowerapp`.`product`.`id`= `flowerapp`.`product_price`.`product_id` LEFT JOIN `codetable`.`general_code` ON `flowerapp`.`product`.`flag`=`codetable`.`general_code`.`value` AND `codetable`.`general_code`.`basename`='product:flag'