-
get sum
I have comp 1, comp2, hall 1 , hall2 , processStatus in table and inside processStatus colum I have valew a, b, c , aand b = successful and c = failed
how can I get sum(successful) sum(failed) group by comp1, comp2, hall1, hall2
Thank you!
________
Lincoln ls history
Last edited by sql; 03-06-2011 at 02:10 AM.
-
select comp1, comp2, hall1, hall2 ,sum(case processstatus when 'successful' then 1 else 0 end case),
sum(case processstatus when 'failed' then 1 else 0 end case),
from t1
group by comp1, comp2, hall1, hall2
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|