MySQL Forums
Forum List  »  General

Re: ask select join
Posted by: Peter Brawley
Date: August 05, 2013 08:25AM

Something like ...

select t1.idserver, sum( if(t2.status='failed',1,0) ) as failed
from t1
join t2 using (idserver)
group by t1.idserver;

Options: ReplyQuote


Subject
Written By
Posted
August 05, 2013 03:39AM
Re: ask select join
August 05, 2013 08:25AM
August 06, 2013 12:16AM


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.