File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 2025 Capabilities queries
2+
3+ <!--
4+ This directory contains all of the 2025 Capabilities chapter queries.
5+
6+ Each query should have a corresponding `metric_name.sql` file.
7+ Note that readers are linked to this directory, so try to make the SQL file names descriptive for easy browsing.
8+
9+ Analysts: if helpful, you can use this README to give additional info about the queries.
10+ -->
11+
12+ ## Resources
13+
14+ - [ 📄 Planning doc] [ ~google-doc ]
15+ - [ 📊 Results sheet] [ ~google-sheets ]
16+ - [ 📝 Markdown file] [ ~chapter-markdown ]
17+
18+ [ ~google-doc ] : https://docs.google.com/document/d/1JFSXGg3KJeDNcWyGdfM8qcEBYZq0b4p3GXR_J7iJqWY/edit?tab=t.0#heading=h.8r1dmmbwunyr
19+ [ ~google-sheets ] : https://docs.google.com/spreadsheets/d/1tBTCtkEw0QEOyebuHIettqGEKw1gtO2EB1jkwpRKb18/edit
20+ [ ~chapter-markdown ] : https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2025/capabilities.md
Original file line number Diff line number Diff line change 1+ # standardSQL
2+ SELECT
3+ client,
4+ fuguAPI,
5+ COUNT (DISTINCT root_page) AS sites,
6+ total,
7+ COUNT (DISTINCT root_page) / total AS pct,
8+ ARRAY_TO_STRING(ARRAY_AGG(DISTINCT page LIMIT 50 ), ' ' ) AS sample_urls
9+ FROM
10+ ` httparchive.crawl.pages`
11+ JOIN
12+ (
13+ SELECT
14+ client,
15+ COUNT (root_page) AS total
16+ FROM
17+ ` httparchive.crawl.pages`
18+ WHERE
19+ date = ' 2025-07-01'
20+ GROUP BY
21+ client
22+ ) USING (client),
23+ UNNEST(JSON_KEYS(custom_metrics .other .` fugu-apis` )) AS fuguAPI
24+ WHERE
25+ date = ' 2025-07-01' AND
26+ custom_metrics .other .` fugu-apis` IS NOT NULL
27+ GROUP BY
28+ fuguAPI,
29+ client,
30+ total
31+ HAVING
32+ COUNT (DISTINCT root_page) >= 10
33+ ORDER BY
34+ pct DESC ,
35+ client;
Original file line number Diff line number Diff line change 1+ # standardSQL
2+ SELECT
3+ client,
4+ page,
5+ COUNT (DISTINCT fuguAPI) AS fuguAPIs
6+ FROM
7+ ` httparchive.crawl.pages` ,
8+ UNNEST(JSON_KEYS(custom_metrics .other .` fugu-apis` )) AS fuguAPI
9+ WHERE
10+ date = ' 2025-07-01' AND
11+ custom_metrics .other .` fugu-apis` IS NOT NULL
12+ GROUP BY
13+ client,
14+ page
15+ HAVING
16+ COUNT (DISTINCT fuguAPI) >= 1
17+ ORDER BY
18+ fuguAPIs DESC ,
19+ page,
20+ client
21+ LIMIT 100 ;
Original file line number Diff line number Diff line change 1717
1818[ ~google-doc ] : https://docs.google.com/document/d/1HpI_E35FU_vqsJlMEONnCyR5lAvzDwVkWBg3lIlwlvw
1919[ ~google-sheets ] : https://docs.google.com/spreadsheets/d/1q_hFsWlt6DZMmwnxrTmU3nCRjT2w38AomAlw8b_lthE/edit
20- [ ~chapter-markdown ] : https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2025/ecommerce .md
20+ [ ~chapter-markdown ] : https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2025/generative-ai .md
You can’t perform that action at this time.
0 commit comments