Created
June 4, 2013 06:39
-
-
Save eagleon/5704012 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select branch_name, | |
sum(case level when 1 then final_score else 0 end) z_s, | |
count(case level when 1 then final_score else null end) z_c, | |
sum(case level when 2 then final_score else 0 end) f_s, | |
count(case level when 2 then final_score else null end) f_c, | |
sum( final_score) t_s, | |
count(final_score) t_c | |
from temp | |
group by branch_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment