MySQL Forums
Forum List  »  Perl

Re: I need help with structuring a table
Posted by: Bob Field
Date: July 29, 2006 08:58PM

SELECT date,
sum( if( status = 'pass',   count_status, 0)) AS Pass,
sum( if( status = 'fail',   count_status, 0)) AS Fail,
sum( if( status = 'killed', count_status, 0)) AS Killed
FROM yourTable
GROUP BY date;

Options: ReplyQuote


Subject
Written By
Posted
Re: I need help with structuring a table
July 29, 2006 08:58PM


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.