Skip to content

Instantly share code, notes, and snippets.

@gilbertococchi
Last active July 21, 2025 17:42
Show Gist options
  • Select an option

  • Save gilbertococchi/083c1516149cf5f70b103451d1790cbc to your computer and use it in GitHub Desktop.

Select an option

Save gilbertococchi/083c1516149cf5f70b103451d1790cbc to your computer and use it in GitHub Desktop.
SELECT
date,
client,
technologies.technology,
category,
COUNT(DISTINCT IF(lighthouse.audits['bf-cache'].details.items IS NULL, page, NULL)) as bfcache_eligible_origins,
COUNT(DISTINCT PAGE) as origins,
ROUND(SAFE_DIVIDE(
COUNT(DISTINCT IF(lighthouse.audits['bf-cache'].details.items IS NULL, page, NULL)),
COUNT(DISTINCT PAGE)
),4) as bfcache_eligible_origins_perc
FROM `httparchive.latest.pages`,
UNNEST(technologies) as technologies,
UNNEST(technologies.categories) as category
WHERE
is_root_page = TRUE AND
category IN (
"CMS",
"CDN",
"Ecommerce",
"Page builders",
"JavaScript frameworks",
"Analytics",
"Web servers",
"Tag managers",
"Live chat",
"Cookie compliance",
"Advertising",
"Hosting"
)
GROUP BY 1, 2, 3, 4
ORDER BY origins DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment