Created
February 20, 2014 00:42
-
-
Save rhelmer/9104672 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
WITH crash AS ( | |
SELECT json_object_field_text(processed_crash, 'cpu_name') AS cpu_name, | |
json_object_field_text(processed_crash, 'os_name') AS os_name, | |
json_object_field_text(processed_crash, 'signature') AS signature, | |
trim('"' from ( | |
string_to_array( | |
json_object_field_text(processed_crash, 'cpu_info'), '|') | |
)[2] | |
) AS core_count | |
FROM processed_crashes | |
JOIN reports_clean ON (processed_crashes.uuid::text = reports_clean.uuid) | |
JOIN product_versions USING (product_version_id) | |
WHERE reports_clean.date_processed | |
BETWEEN '2014-02-18 00:00:00' AND '2014-02-18 01:00:00' | |
AND product_name = 'Firefox' | |
AND version_string = '30.0a1' | |
) | |
SELECT cpu_name, core_count, signature, count(cpu_name) as total | |
FROM crash | |
GROUP BY signature, core_count, cpu_name | |
ORDER BY total DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment