If I have a metric with the following labels:
my_metric{group=\"group a\"} 100 my_metric{group=\"group b\"} 100 my_metric{group=\"group c\"} 100 my_metric{gro
It's even easier
sum by (group) (my_metric)