SELECT 
obj_main.isys_obj__id AS '__id__', 
obj_main.isys_obj__id 'isys_cmdb_dao_category_g_global__id', 
 (CONCAT(obj_main.isys_obj__title, ' {', obj_main.isys_obj__id, '}')   ) 'isys_cmdb_dao_category_g_global__title' , 
 (SELECT CONCAT(isys_obj__title, ' {', isys_obj__id, '}')
                                FROM isys_catg_virtual_machine_list
                                INNER JOIN isys_connection ON isys_connection__id = isys_catg_virtual_machine_list__isys_connection__id
                                INNER JOIN isys_obj ON isys_obj__id = isys_connection__isys_obj__id  WHERE isys_catg_virtual_machine_list__isys_obj__id = obj_main.isys_obj__id  AND isys_catg_virtual_machine_list__status = 2   LIMIT 1) 'isys_cmdb_dao_category_g_virtual_machine__hosts' , 
 (CONCAT(DATE_FORMAT(obj_main.isys_obj__created, '%d.%m.%Y %H:%i:%s'), ' (' , obj_main.isys_obj__created_by, ')')   ) 'isys_cmdb_dao_category_g_global__created' , 
 (CONCAT(DATE_FORMAT(obj_main.isys_obj__updated, '%d.%m.%Y %H:%i:%s'), ' (' , obj_main.isys_obj__updated_by, ')')   ) 'isys_cmdb_dao_category_g_global__changed' , 
 (SELECT CONCAT("{#", isys_cmdb_status__color, "} ", isys_cmdb_status__title) FROM isys_cmdb_status  WHERE obj_main.isys_obj__isys_cmdb_status__id = isys_cmdb_status__id  AND isys_cmdb_status__status = 2   ) 'isys_cmdb_dao_category_g_global__cmdb_status'  

FROM isys_obj AS obj_main 
 

WHERE TRUE 
AND obj_main.isys_obj__isys_obj_type__id = 101 
