-
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into cms-2024-markdown
- Loading branch information
Showing
17 changed files
with
3,145 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#standardSQL | ||
# CMS adoption OVER time | ||
# cms_adoption.sql | ||
|
||
SELECT | ||
client, | ||
2024 AS year, | ||
COUNT(DISTINCT page) AS freq, | ||
total, | ||
COUNT(DISTINCT page) / total AS pct | ||
FROM | ||
`httparchive.all.pages`, | ||
UNNEST(technologies) AS technologies, | ||
UNNEST(technologies.categories) AS cats | ||
JOIN ( | ||
SELECT | ||
client, | ||
COUNT(0) AS total | ||
FROM | ||
`httparchive.all.pages` | ||
WHERE | ||
date = '2024-06-01' AND | ||
is_root_page | ||
GROUP BY | ||
client) | ||
USING | ||
(client) | ||
WHERE | ||
cats = 'CMS' AND | ||
date = '2024-06-01' AND | ||
is_root_page | ||
GROUP BY | ||
client, | ||
total | ||
UNION ALL | ||
SELECT | ||
client, | ||
2023 AS year, | ||
COUNT(DISTINCT page) AS freq, | ||
total, | ||
COUNT(DISTINCT page) / total AS pct | ||
FROM | ||
`httparchive.all.pages`, | ||
UNNEST(technologies) AS technologies, | ||
UNNEST(technologies.categories) AS cats | ||
JOIN ( | ||
SELECT | ||
client, | ||
COUNT(0) AS total | ||
FROM | ||
`httparchive.all.pages` | ||
WHERE | ||
date = '2023-06-01' AND | ||
is_root_page | ||
GROUP BY | ||
client) | ||
USING | ||
(client) | ||
WHERE | ||
cats = 'CMS' AND | ||
date = '2023-06-01' AND | ||
is_root_page | ||
GROUP BY | ||
client, | ||
total | ||
UNION ALL | ||
SELECT | ||
client, | ||
2022 AS year, | ||
COUNT(DISTINCT page) AS freq, | ||
total, | ||
COUNT(DISTINCT page) / total AS pct | ||
FROM | ||
`httparchive.all.pages`, | ||
UNNEST(technologies) AS technologies, | ||
UNNEST(technologies.categories) AS cats | ||
JOIN ( | ||
SELECT | ||
client, | ||
COUNT(0) AS total | ||
FROM | ||
`httparchive.all.pages` | ||
WHERE | ||
date = '2022-06-01' AND | ||
is_root_page | ||
GROUP BY | ||
client) | ||
USING | ||
(client) | ||
WHERE | ||
cats = 'CMS' AND | ||
date = '2022-06-01' AND | ||
is_root_page | ||
GROUP BY | ||
client, | ||
total | ||
ORDER BY | ||
year DESC, | ||
pct DESC |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#standardSQL | ||
# All CMS popularity per geo | ||
# cms_adoption_by_geo.sql | ||
|
||
WITH geo_summary AS ( | ||
SELECT | ||
`chrome-ux-report`.experimental.GET_COUNTRY(country_code) AS geo, | ||
IF(device = 'desktop', 'desktop', 'mobile') AS client, | ||
origin, | ||
COUNT(DISTINCT origin) OVER (PARTITION BY country_code, IF(device = 'desktop', 'desktop', 'mobile')) AS total | ||
FROM | ||
`chrome-ux-report.materialized.country_summary` | ||
WHERE | ||
yyyymm = 202406 | ||
) | ||
|
||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
client, | ||
geo, | ||
COUNT(0) AS pages, | ||
ANY_VALUE(total) AS total, | ||
COUNT(0) / ANY_VALUE(total) AS pct | ||
FROM ( | ||
SELECT DISTINCT | ||
geo, | ||
client, | ||
total, | ||
CONCAT(origin, '/') AS page | ||
FROM | ||
geo_summary | ||
) | ||
JOIN ( | ||
SELECT | ||
client, | ||
page | ||
FROM | ||
`httparchive.all.pages`, | ||
UNNEST(technologies) AS technologies, | ||
UNNEST(technologies.categories) AS cats | ||
WHERE | ||
date = '2024-06-01' AND | ||
cats = 'CMS' AND | ||
is_root_page | ||
) | ||
USING | ||
(client, | ||
page) | ||
GROUP BY | ||
client, | ||
geo) | ||
WHERE | ||
pages > 1000 | ||
ORDER BY | ||
pages DESC |
Oops, something went wrong.