Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum Query Question 1

Status
Not open for further replies.

langnoi

IS-IT--Management
Mar 20, 2003
6
US
Let's say I have the following table with 2 columns:

Table = Account_tbl
1st Column = Account_name
2nd Column = Amount

How can I set up sum sql to get the total amounts for all the accounts in the tbls? I wanna get it so that it will display the totals for all the 'Smith' and 'Jones'.

Please advise.

thanks
 
langnoi,

SELECT Account_name, SUM(Amount)
FROM Account_tbl
GROUP BY Account_name

Logicalman
 
Thanks LogicalmanUS for your answer...your sql worked like a charm. FYI - I marked your answer as helpful/expert post ;) thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top