SQL Statement

T

TyF

I need to write an SQL statement that will
Group by Location and
Sum Total Weight
Sum Total Tons
Sum Total Amount
 
K

KARL DEWEY

SELECT Location, Sum([Weight]) AS Total_Weight, Sum([Tons]) AS Total_Tons,
Sum([Amount]) AS Total_Amount
FROM YourTable
GROUP BY Location;
 
T

TyF

Good Advice... I have everything so far but the group.

KARL DEWEY said:
SELECT Location, Sum([Weight]) AS Total_Weight, Sum([Tons]) AS Total_Tons,
Sum([Amount]) AS Total_Amount
FROM YourTable
GROUP BY Location;
--
KARL DEWEY
Build a little - Test a little


TyF said:
I need to write an SQL statement that will
Group by Location and
Sum Total Weight
Sum Total Tons
Sum Total Amount
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top