MySQL Forums
Forum List  »  General

Re: How can I get a sum from specific fields in where clause?
Posted by: Peter Brawley
Date: April 11, 2022 08:43AM

That query would be ...

select srvid, sum(answer)
from tablename
group by srvid;

... but in your original question you said you need SUM(Answer) for specific MX values, which the above query would not deliver.

So let's see the entire requirement in plain logical, contradiction-free English. And if the toy table I suggested won't serve for working out this problem, please provide the Show Create Table result for the table you're working with.

Options: ReplyQuote




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.