I need help in generating the SQL query for grouping distinct records into one record and summing up values. The query needs to go through a table and group several records together. The results need to show the grouped records plus distinct records.
sample table:
Name Total TotalX TotalY
A1 6 7 8
A2 1 2 3
A3 2 4 5
B1 1 2 3
B2 1 3 5
result needed:
Name Total TotalX TotalY
Combined A 9 13 16
Combined B 2 5 8
Thanks!
sample table:
Name Total TotalX TotalY
A1 6 7 8
A2 1 2 3
A3 2 4 5
B1 1 2 3
B2 1 3 5
result needed:
Name Total TotalX TotalY
Combined A 9 13 16
Combined B 2 5 8
Thanks!