将2个条目合并为1个条目

I have one requirement that says that to show the entry as merged rather than actual database change.For example suppose I have two entries of log from the database like -

Test #123456 send email to abc by support

Test #123456 send email to xyz by support

Now I have this 2 entries from the database.

Can it be possible to show like this -

Test #123456 send email to 2 persons by support.

I tried by merging this 2 entries with iteration through array. Is there any other way to accomplish this ? Can it be achived by query ?