Skip to content

Instantly share code, notes, and snippets.

@senthilp
Created May 28, 2019 23:26
Show Gist options
  • Save senthilp/1f09d3ddcc923e98347a6c1c71944d20 to your computer and use it in GitHub Desktop.
Save senthilp/1f09d3ddcc923e98347a6c1c71944d20 to your computer and use it in GitHub Desktop.
eBay FCP
SELECT
origin,
MULTIPLY(ROUND(SUM(IF(first_contentful_paint.histogram.bin.start < 1000, first_contentful_paint.histogram.bin.density , 0)) / SUM( first_contentful_paint.histogram.bin.density ), 4), 100) AS fast_AboveTheFold,
MULTIPLY(ROUND(SUM(IF(first_contentful_paint.histogram.bin.start >= 1000 AND first_contentful_paint.histogram.bin.start < 3000, first_contentful_paint.histogram.bin.density, 0)) / SUM(first_contentful_paint.histogram.bin.density), 4), 100) AS average_AboveTheFold,
MULTIPLY(ROUND(SUM(IF(first_contentful_paint.histogram.bin.start >= 3000, first_contentful_paint.histogram.bin.density, 0)) / SUM(first_contentful_paint.histogram.bin.density), 4), 100) AS slow_AboveTheFold
FROM
[chrome-ux-report:all.201904]
WHERE
origin IN ('https://www.ebay.com', 'https://www.amazon.com') AND
form_factor.name = "desktop"
GROUP BY
origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment