Created
March 5, 2014 20:08
-
-
Save rhelmer/9375540 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
UPDATE reports_clean_buffer | |
SET release_channel = json_object_field_text(rewrite, 'rewrite_build_type_to'), | |
product_version_id = product_versions.product_version_id | |
FROM update_channel_map, product_versions | |
JOIN raw_crashes as rc on (uuid::uuid = rc.uuid) | |
WHERE product_versions.version_string = trim(both '"' from (rewrite->'Version')::text) | |
AND rc.date_processed | |
BETWEEN (fromtime - interval '1 day') AND (fromtime + interval '1 day' ) | |
AND product_versions.product_name = 'B2G' | |
--AND (rewrite->'Android_Manufacturer')::text = (rc.raw_crash->'Android_Manufacturer')::text | |
--AND (rewrite->'Android_Model')::text = (rc.raw_crash->'Android_Model')::text | |
--AND (rewrite->'Android_Version')::text = (rc.raw_crash->'Android_Version')::text | |
--AND (rewrite->'B2G_OS_Version')::text = (rc.raw_crash->'B2G_OS_Version')::text | |
AND build IN | |
(SELECT trim(both '"' from value::text)::numeric | |
FROM json_array_elements(rewrite->'BuildID')) | |
--AND (rewrite->'ProductName')::text = (rc.raw_crash->'ProductName')::text | |
--AND (rewrite->'ReleaseChannel')::text = (rc.raw_crash->'ReleaseChannel')::text | |
AND (rewrite->'Version')::text = (rc.raw_crash->'Version')::text; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment