@@ -126,14 +126,14 @@ crux AS (
126
126
IS_GOOD(small_cls, medium_cls, large_cls) AS good_cls,
127
127
IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp) AS any_lcp,
128
128
IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AS good_lcp,
129
-
130
- (IS_GOOD(fast_inp, avg_inp, slow_inp ) OR fast_inp IS NULL) AND
131
- IS_GOOD(small_cls, medium_cls, large_cls) AND
132
- IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AS good_cwv_2024 ,
133
-
134
- ( IS_GOOD(fast_fid, avg_fid, slow_fid) OR fast_fid IS NULL ) AND
135
- IS_GOOD(small_cls, medium_cls, large_cls) AND
136
- IS_GOOD(fast_lcp, avg_lcp, slow_lcp ) AS good_cwv_2023 ,
129
+ IF(' ${ pastMonth } ' < '2024-01-01',
130
+ (IS_GOOD(fast_fid, avg_fid, slow_fid ) OR fast_fid IS NULL) AND
131
+ IS_GOOD(small_cls, medium_cls, large_cls) AND
132
+ IS_GOOD(fast_lcp, avg_lcp, slow_lcp),
133
+ (IS_GOOD(fast_inp, avg_inp, slow_inp) OR fast_inp IS NULL) AND
134
+ IS_GOOD(small_cls, medium_cls, large_cls ) AND
135
+ IS_GOOD(fast_lcp, avg_lcp, slow_lcp)
136
+ ) AS good_cwv ,
137
137
138
138
# WV
139
139
IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp) AS any_fcp,
@@ -267,13 +267,9 @@ SELECT
267
267
COUNTIF(any_fcp) AS origins_with_any_fcp,
268
268
COUNTIF(any_ttfb) AS origins_with_any_ttfb,
269
269
COUNTIF(any_inp) AS origins_with_any_inp,
270
- COUNTIF(good_cwv_2024) AS origins_with_good_cwv,
271
- COUNTIF(good_cwv_2024) AS origins_with_good_cwv_2024,
272
- COUNTIF(good_cwv_2023) AS origins_with_good_cwv_2023,
270
+ COUNTIF(good_cwv) AS origins_with_good_cwv,
273
271
COUNTIF(any_lcp AND any_cls) AS origins_eligible_for_cwv,
274
- SAFE_DIVIDE(COUNTIF(good_cwv_2024), COUNTIF(any_lcp AND any_cls)) AS pct_eligible_origins_with_good_cwv,
275
- SAFE_DIVIDE(COUNTIF(good_cwv_2024), COUNTIF(any_lcp AND any_cls)) AS pct_eligible_origins_with_good_cwv_2024,
276
- SAFE_DIVIDE(COUNTIF(good_cwv_2023), COUNTIF(any_lcp AND any_cls)) AS pct_eligible_origins_with_good_cwv_2023,
272
+ SAFE_DIVIDE(COUNTIF(good_cwv), COUNTIF(any_lcp AND any_cls)) AS pct_eligible_origins_with_good_cwv,
277
273
278
274
# Lighthouse data
279
275
SAFE_CAST(APPROX_QUANTILES(accessibility, 1000)[OFFSET(500)] AS NUMERIC) AS median_lighthouse_score_accessibility,
0 commit comments