Last active
February 6, 2017 09:53
-
-
Save HennIdan/28afd34b5ad91bf6ad30217d688dc779 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 sample_repo_name | |
,log_level | |
,CASE WHEN parametersCount + concatenationCount = 0 THEN "0" | |
WHEN parametersCount + concatenationCount = 1 THEN "1" | |
WHEN parametersCount + concatenationCount = 2 THEN "2" | |
WHEN parametersCount + concatenationCount = 3 THEN "3" | |
WHEN parametersCount + concatenationCount = 4 THEN "4" | |
WHEN parametersCount + concatenationCount >= 5 THEN "5+" | |
END total_params_tier | |
,SUM(parametersCount + concatenationCount) total_params | |
,SUM(CASE WHEN parametersCount > 0 THEN 1 ELSE 0 END) has_parameters | |
,SUM(CASE WHEN concatenationCount > 0 THEN 1 ELSE 0 END) has_concatenation | |
,SUM(CASE WHEN parametersCount = 0 AND concatenationCount = 0 THEN 1 ELSE 0 END) has_none | |
,SUM(CASE WHEN parametersCount > 0 AND concatenationCount > 0 THEN 1 ELSE 0 END) has_both | |
,COUNT(1) logging_statements | |
,SUM(parametersCount) parameters_count | |
,SUM(concatenationCount) concatenation_count | |
,SUM(CASE WHEN isComment = true THEN 1 ELSE 0 END) comment_count | |
,SUM(CASE WHEN shouldNeverHappen = true THEN 1 ELSE 0 END) should_never_happen_count | |
FROM [java-log-levels-usage:java_log_level_usage.top_repos_java_log_lines_no_android_no_arduino_attributes] | |
GROUP BY sample_repo_name | |
,log_level | |
,total_params_tier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment