SELECT isys_cats_person_list.*, isys_person_2_group.*, isys_cats_person_group_list.*, persongroup.*, person.isys_obj__id as `person_id`, person.isys_obj__title as `person_title`, person.isys_obj__sysid as `person_sysid`, person.isys_obj__isys_obj_type__id as `person_type`, mail_person.isys_catg_mail_addresses_list__title AS isys_cats_person_list__mail_address, mail_pgroup.isys_catg_mail_addresses_list__title AS isys_cats_person_group_list__email_address
            FROM isys_person_2_group
            INNER JOIN isys_cats_person_list ON isys_person_2_group__isys_obj__id__person = isys_cats_person_list__isys_obj__id
            LEFT JOIN isys_cats_person_group_list ON isys_person_2_group__isys_obj__id__group = isys_cats_person_group_list__isys_obj__id
            LEFT JOIN isys_obj persongroup ON persongroup.isys_obj__id = isys_cats_person_group_list__isys_obj__id
            INNER JOIN isys_obj person ON person.isys_obj__id = isys_cats_person_list__isys_obj__id
            LEFT JOIN isys_catg_mail_addresses_list AS mail_person ON mail_person.isys_catg_mail_addresses_list__isys_obj__id = person.isys_obj__id AND mail_person.isys_catg_mail_addresses_list__primary = 1
            LEFT JOIN isys_catg_mail_addresses_list AS mail_pgroup ON mail_pgroup.isys_catg_mail_addresses_list__isys_obj__id = persongroup.isys_obj__id AND mail_pgroup.isys_catg_mail_addresses_list__primary = 1
            WHERE TRUE  AND (isys_person_2_group__id = '561')