Hi all,
this is the point where I am saying graphical mapping will become too complicated. I suggest here to use XSLT mapping and and use muenchian grouping
https://en.wikipedia.org/wiki/XSLT/Muenchian_grouping
http://stackoverflow.com/questions/2146648/how-to-apply-group-by-on-xslt-elements
Here it would be absolutely easy to achieve what you want and the code is absolutely easy to understand and maintain.
Regards
Helmut