Group by subitems

Can we please add to the group by feature to group elements by removing the main items and list all the subitems in each group.