Created
September 11, 2024 03:14
-
-
Save adamsilverstein/997dcea2459f8e552621bc95a859ace0 to your computer and use it in GitHub Desktop.
cms ratio % of total sites over time
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 | |
sites AS ( | |
SELECT | |
page AS url, | |
date, | |
category | |
FROM | |
`httparchive.all.pages`, | |
UNNEST(technologies) AS technologies, | |
UNNEST(technologies.categories) AS category | |
WHERE | |
date >= '2022-01-01' | |
) | |
SELECT | |
date, | |
COUNT(DISTINCT url) AS all_sites, | |
COUNT(DISTINCT (IF(category = 'CMS', url, NULL))) AS cms_sites, | |
COUNT(DISTINCT (IF(category = 'CMS', url, NULL))) / COUNT(DISTINCT url) AS cms_ratio | |
FROM sites | |
GROUP BY date | |
ORDER BY date ASC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Results: