Group transactions by category on output