MySQL Forums
Forum List  »  General

query help
Posted by: mik haw
Date: November 11, 2013 03:26PM

Hello, Im having so much problems trying to get this result.

I have a table which has fields id, amount, year

there is no precision in the data apart from eg: 2002, 2003, 2004

so the table I have is

1 150 2002
2 250 2002
3 100 2003
4 50 2004
5 340 2004

now I need to take all of data, total the amount and have a table return with

400 2002
100 2003
390 2004

ANy help or pointers to the right direction would be extremely appreciated, it really is a simple table im working with.

Kind regards
Mik

Options: ReplyQuote


Subject
Written By
Posted
query help
November 11, 2013 03:26PM
November 11, 2013 06:47PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.