MySQL Forums
Forum List  »  Newbie

Re: SQL Query Question
Posted by: Felix Geerinckx
Date: April 12, 2005 04:38PM

> select domain, count(id) as count, sum(bytes) as
> bytes, if(isspam,sum(bytes),0) as spams from
> data;


... SUM(IF(isspam, bytes, 0)) AS spams ...

--
felix

Options: ReplyQuote


Subject
Written By
Posted
April 12, 2005 03:19PM
Re: SQL Query Question
April 12, 2005 04:38PM
April 12, 2005 10:41PM


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.