MySQL Forums
Forum List  »  Newbie

sum and display issue
Posted by: Akis Giannopoulos
Date: March 24, 2012 02:12PM


I've got a table like this:

id type amount
1 1 100
2 1 200
3 2 100
4 2 100
5 2 100

What I want is to sum the amount grouped by type and pass the result in two variables so I can display it like this

Type1 Type2
300 300

Is this possible somehow?

Options: ReplyQuote

Written By
sum and display issue
March 24, 2012 02:12PM
March 24, 2012 06:54PM

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.