Created
May 2, 2018 17:11
-
-
Save RatulSaha/2009ab5956163d247cac1240c3facba4 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
WITH query1 AS ( | |
SELECT | |
'china' AS country_code, | |
origin, | |
ROUND(SUM(IF(fcp.start <=1000, fcp.density,0)) / SUM(fcp.density),5) AS SEB_native | |
FROM | |
`chrome-ux-report.country_cn.201712`, | |
UNNEST(first_contentful_paint.histogram.bin) AS fcp | |
WHERE | |
origin = 'https://www.amazon.cn' | |
GROUP BY | |
origin), | |
query2 AS ( | |
SELECT | |
origin, | |
ROUND(SUM(IF(fcp.start <=1000, fcp.density,0)) / SUM(fcp.density),5) AS SEB_global | |
FROM | |
`chrome-ux-report.country_cn.201712`, | |
UNNEST(first_contentful_paint.histogram.bin) AS fcp | |
WHERE | |
origin = 'https://www.amazon.com' | |
GROUP BY | |
origin ) | |
SELECT | |
country_code, | |
SEB_native, | |
SEB_global | |
FROM | |
query1, | |
query2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment