How can I use GroupBy to add the second element and not the last?

GroupBy[{{a, 1, x}, {b, 2, v}, {a, 3, y}, {a, 7, z}, {b, 2, w}},
First → Last, Total]

adds the last element or last element. How can I add the second element?

Do you mean just the second elements instead of the last elements?

GroupBy[{{a, 1, x}, {b, 2, v}, {a, 3, y}, {a, 7, z}, {b, 2, w}}, First -> (#[[2]] &), Total]
(* <|a -> 11, b -> 4|> *)

Thank you very much Eric!!!