Skip to content

Commit 2db0755

Browse files
committed
SQL JSON_VALUE preference
1 parent 554a236 commit 2db0755

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/2025/webassembly/counts.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ WITH wasmRequests AS (
88
root_page,
99
url,
1010
REGEXP_EXTRACT(url, r'([^/]+)$') AS filename,
11-
SAFE_CAST(JSON_VALUE(summary, '$.respBodySize') AS INT64) AS respBodySize
11+
SAFE_CAST(JSON_VALUE(summary.respBodySize) AS INT64) AS respBodySize
1212
FROM
1313
`httparchive.crawl.requests`
1414
WHERE
1515
date IN ('2021-07-01', '2022-06-01', '2023-06-01', '2024-06-01', '2025-07-01') AND
1616
(
1717
(date IN ('2024-06-01', '2025-07-01') AND type = 'wasm')
1818
OR
19-
(date IN ('2021-07-01', '2022-06-01', '2023-06-01') AND (JSON_VALUE(summary, '$.mimeType') = 'application/wasm' OR JSON_VALUE(summary, '$.ext') = 'wasm'))
19+
(date IN ('2021-07-01', '2022-06-01', '2023-06-01') AND (JSON_VALUE(summary.mimeType) = 'application/wasm' OR JSON_VALUE(summary, '$.ext') = 'wasm'))
2020
)
2121
),
2222

0 commit comments

Comments
 (0)