Query to Sum Values and Remove Duplicates

noobaccessuser

New member
Local time
Yesterday, 19:09
Joined
Dec 7, 2012
Messages
1
Hello!

I am trying to make a query (or even a macro if need be) to add up the different weights for each order number while removing duplicates of the order number. I know it's really confusing so here's an example:

Order Number Consignee Tracking Weight
242567 Joe Turner 54A52 16
242567 Joe Turner 54A52 13
243555 Frank Smith 53B42 5
243555 Frank Smith 53B42 6
243555 Frank Smith 53B42 4

That's basically how the data is sorted at this time. The end result should look like:

Order Number Consignee Tracking Weight
242567 Joe Turner 54A52 29
243555 Frank Smith 53B42 15


I've thought and ran every possible Query I could unfortunately I can't get it to work.

Thank you all for your help!!!!
 
Remember to change "YourTableName" to the table name you use.

SELECT [Order Number], Consignee, Tracking, Sum(Weight) AS SumOfWeight
FROM YourTableName
GROUP BY [Order Number], Consignee, Tracking;
 

Users who are viewing this thread

Back
Top Bottom