Skip to content

Commit 0245b0c

Browse files
committed
fix CV04
1 parent ca8a4b5 commit 0245b0c

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

sql/2025/sustainability/ecommerce_bytes_per_type.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ WITH ecommerce_data AS (
274274
SELECT
275275
client,
276276
ecommerce,
277-
COUNT(*) AS pages,
277+
COUNT(0) AS pages,
278278

279279
-- Median resource weights and emissions
280280
APPROX_QUANTILES(total_kb, 1000) [OFFSET(500)] AS median_total_kb,

sql/2025/sustainability/favicons.sql

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ WITH favicons AS (
5050
GETFAVICONIMAGE(
5151
JSON_EXTRACT_SCALAR(payload, '$._almanac')
5252
) AS image_type_extension,
53-
COUNT(*) AS freq,
54-
SUM(COUNT(*)) OVER (PARTITION BY client) AS total,
55-
COUNT(
56-
*
57-
) / SUM(COUNT(*)) OVER (PARTITION BY client) AS percentage_of_total
53+
COUNT(0) AS freq,
54+
SUM(COUNT(0)) OVER (PARTITION BY client) AS total,
55+
COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS percentage_of_total
5856
FROM
5957
`httparchive.crawl.pages`
6058
WHERE

sql/2025/sustainability/ssg_bytes_per_type.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ WITH ssg_data AS (
273273
SELECT
274274
client,
275275
ssg,
276-
COUNT(*) AS pages,
276+
COUNT(0) AS pages,
277277

278278
-- Median resource weights and emissions
279279
APPROX_QUANTILES(total_kb, 1000) [OFFSET(500)] AS median_total_kb,

sql/2025/sustainability/text_compression.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ compression_data AS (
3333
WHEN resp_content_encoding IS NULL THEN 'no text compression'
3434
ELSE 'other'
3535
END AS compression_type,
36-
COUNT(*) AS num_requests,
37-
SUM(COUNT(*)) OVER (PARTITION BY client) AS total,
36+
COUNT(0) AS num_requests,
37+
SUM(COUNT(0)) OVER (PARTITION BY client) AS total,
3838
ROUND(
39-
COUNT(*) / SUM(COUNT(*)) OVER (PARTITION BY client) * 100, 2
39+
COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) * 100, 2
4040
) AS pct
4141
FROM
4242
request_data

0 commit comments

Comments
 (0)