Click here to Skip to main content
15,891,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
a | 2
b | 2
c | 3
a | 4
b| 5


output comes

a| 6
b | 7
c | 3


how i acchive that

SELECT SUM(FEEAMT) FROM table where colmnname = 'a' wht this is not best way...
Posted
Comments
OriginalGriff 6-Jun-14 2:36am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.

1 solution

Hello friend, I'm trying to provide a solution as per my understanding of this requirement:
Let's assume the table name is - TABLE1 with two columns - NAME, FEEAMT
SQL
SELECT NAME, SUM(FEEAMT) 
FROM TABLE1
GROUP BY NAME

Let me know your feedback.
- DD
 
Share this answer
 
Comments
Member 10285877 9-Jun-14 1:09am    
thanku sir
Debabrata_Das 9-Jun-14 2:00am    
You are welcome :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900