lines aggregation by category