Multiple table rows in one row Informix I have problem just like this one but in Informix.
I have table with 2 attributes ID, email like this one:

ID  email
1   my_mail1@mail.com
2   my_mail2@mail.com
2   my_mail3@mail.com
2   my_mail4@mail.com
3   my_mail5@mail.com
4   my_mail6@mail.com


I want to create a query that would return this:

ID   email
1    my_mail1@mail.com
2    my_mail2@mail.com my_mail3@mail.com my_mail4@mail.com
3    my_mail5@mail.com
4    my_mail6@mail.com
If you have version 12.1 the following method also works, and is especially useful if you don't have access rights to create procedures on the production database.

It uses rank()over() to group the email addresses by id and sequence them,
and then sys_connect_by_path() to do the concatenation.

select id,  sys_connect_by_path(trim(email),' ') as email
from
 (
  select id, email,
         rank() over (partition by id order by email) as seq,
         rank() over (partition by id order by email desc) as rseq
    from emails
 )
 where rseq = 1 start with seq = 1
 connect by prior id=id and prior seq=seq-1
 order by id