diff --git a/sql/histograms/bootupJs.sql b/migrated_sql/histograms/bootupJs.sql similarity index 97% rename from sql/histograms/bootupJs.sql rename to migrated_sql/histograms/bootupJs.sql index e44601b..6292c88 100644 --- a/sql/histograms/bootupJs.sql +++ b/migrated_sql/histograms/bootupJs.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/bytesCss.sql b/migrated_sql/histograms/bytesCss.sql similarity index 97% rename from sql/histograms/bytesCss.sql rename to migrated_sql/histograms/bytesCss.sql index 97c16bc..446df8a 100644 --- a/sql/histograms/bytesCss.sql +++ b/migrated_sql/histograms/bytesCss.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/bytesFont.sql b/migrated_sql/histograms/bytesFont.sql similarity index 97% rename from sql/histograms/bytesFont.sql rename to migrated_sql/histograms/bytesFont.sql index 2b7548e..7066320 100644 --- a/sql/histograms/bytesFont.sql +++ b/migrated_sql/histograms/bytesFont.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/bytesHtml.sql b/migrated_sql/histograms/bytesHtml.sql similarity index 97% rename from sql/histograms/bytesHtml.sql rename to migrated_sql/histograms/bytesHtml.sql index 0be97a9..73c4894 100644 --- a/sql/histograms/bytesHtml.sql +++ b/migrated_sql/histograms/bytesHtml.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/bytesImg.sql b/migrated_sql/histograms/bytesImg.sql similarity index 97% rename from sql/histograms/bytesImg.sql rename to migrated_sql/histograms/bytesImg.sql index 7aa5b7d..eb4323c 100644 --- a/sql/histograms/bytesImg.sql +++ b/migrated_sql/histograms/bytesImg.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/bytesJs.sql b/migrated_sql/histograms/bytesJs.sql similarity index 97% rename from sql/histograms/bytesJs.sql rename to migrated_sql/histograms/bytesJs.sql index 6d2662f..1a8d10a 100644 --- a/sql/histograms/bytesJs.sql +++ b/migrated_sql/histograms/bytesJs.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/bytesOther.sql b/migrated_sql/histograms/bytesOther.sql similarity index 97% rename from sql/histograms/bytesOther.sql rename to migrated_sql/histograms/bytesOther.sql index 8ceff61..365f7c2 100644 --- a/sql/histograms/bytesOther.sql +++ b/migrated_sql/histograms/bytesOther.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/bytesTotal.sql b/migrated_sql/histograms/bytesTotal.sql similarity index 97% rename from sql/histograms/bytesTotal.sql rename to migrated_sql/histograms/bytesTotal.sql index 86ebb02..da5f77f 100644 --- a/sql/histograms/bytesTotal.sql +++ b/migrated_sql/histograms/bytesTotal.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/bytesVideo.sql b/migrated_sql/histograms/bytesVideo.sql similarity index 97% rename from sql/histograms/bytesVideo.sql rename to migrated_sql/histograms/bytesVideo.sql index af3b9d3..561c777 100644 --- a/sql/histograms/bytesVideo.sql +++ b/migrated_sql/histograms/bytesVideo.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/compileJs.sql b/migrated_sql/histograms/compileJs.sql similarity index 97% rename from sql/histograms/compileJs.sql rename to migrated_sql/histograms/compileJs.sql index eddc382..9114785 100644 --- a/sql/histograms/compileJs.sql +++ b/migrated_sql/histograms/compileJs.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/migrated_sql/histograms/cruxShopifyThemes.sql b/migrated_sql/histograms/cruxShopifyThemes.sql new file mode 100644 index 0000000..1db39b8 --- /dev/null +++ b/migrated_sql/histograms/cruxShopifyThemes.sql @@ -0,0 +1,193 @@ +-- Core web vitals by Shopify theme +CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( + good / (good + needs_improvement + poor) >= 0.75 +); + +CREATE TEMP FUNCTION IS_POOR(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( + poor / (good + needs_improvement + poor) > 0.25 +); + +CREATE TEMP FUNCTION IS_NON_ZERO(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( + good + needs_improvement + poor > 0 +); + +-- Test CrUX data exists +WITH crux_test AS ( -- noqa: ST03 + SELECT + 1 + FROM + `chrome-ux-report.all.${YYYYMM}` +), + +-- All Shopify shops in HTTPArchive +archive_pages AS ( + SELECT + client, + page AS url, + JSON_VALUE(custom_metrics.ecommerce.Shopify.theme.name) AS theme_name, + JSON_VALUE(custom_metrics.ecommerce.Shopify.theme.theme_store_id) AS theme_store_id + FROM + `httparchive.crawl.pages` + WHERE + date = '${YYYY-MM-DD}' AND + is_root_page AND + JSON_VALUE(custom_metrics.ecommerce.Shopify.theme.name) IS NOT NULL --first grab all shops for market share +) + +SELECT + client, + archive_pages.theme_store_id AS id, + theme_names.theme_name AS top_theme_name, + COUNT(DISTINCT origin) AS origins, + -- Origins with good LCP divided by origins with any LCP. + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_GOOD(fast_lcp, avg_lcp, slow_lcp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL)) + ) AS pct_good_lcp, + -- Origins with needs improvement are anything not good, nor poor. + 1 - + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_GOOD(fast_lcp, avg_lcp, slow_lcp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL)) + ) + - + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_POOR(fast_lcp, avg_lcp, slow_lcp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL))) + AS pct_ni_lcp, + -- Origins with poor LCP divided by origins with any LCP. + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_POOR(fast_lcp, avg_lcp, slow_lcp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL)) + ) AS pct_poor_lcp, + + -- Origins with good TTFB divided by origins with any TTFB. + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_GOOD(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)) + ) AS pct_good_ttfb, + -- Origins with needs improvement are anything not good, nor poor. + 1 - + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_GOOD(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)) + ) + - + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_POOR(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL))) + AS pct_ni_ttfb, + -- Origins with poor TTFB divided by origins with any TTFB. + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_POOR(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)) + ) AS pct_poor_ttfb, + + -- Origins with good FCP divided by origins with any FCP. + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_GOOD(fast_fcp, avg_fcp, slow_fcp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp), origin, NULL)) + ) AS pct_good_fcp, + -- Origins with needs improvement are anything not good, nor poor. + 1 - + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_GOOD(fast_fcp, avg_fcp, slow_fcp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp), origin, NULL)) + ) + - + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_POOR(fast_fcp, avg_fcp, slow_fcp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp), origin, NULL))) + AS pct_ni_fcp, + -- Origins with poor FCP divided by origins with any FCP. + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_POOR(fast_fcp, avg_fcp, slow_fcp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp), origin, NULL)) + ) AS pct_poor_fcp, + + -- Origins with good INP divided by origins with any INP. + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_GOOD(fast_inp, avg_inp, slow_inp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL)) + ) AS pct_good_inp, + -- Origins with needs improvement are anything not good, nor poor. + 1 - + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_GOOD(fast_inp, avg_inp, slow_inp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL)) + ) + - + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_POOR(fast_inp, avg_inp, slow_inp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL))) + AS pct_ni_inp, + -- Origins with poor INP divided by origins with any INP. + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_POOR(fast_inp, avg_inp, slow_inp), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL)) + ) AS pct_poor_inp, + + -- Origins with good CLS divided by origins with any CLS. + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL)) + ) AS pct_good_cls, + -- Origins with needs improvement are anything not good, nor poor. + 1 - + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL)) + ) + - + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_POOR(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) + AS pct_ni_cls, + -- Origins with poor CLS divided by origins with any CLS. + SAFE_DIVIDE( + COUNT(DISTINCT IF(IS_POOR(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF(IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL)) + ) AS pct_poor_cls, + + -- Origins with good LCP, INP (optional), and CLS divided by origins with any LCP and CLS. + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AND + IS_GOOD(fast_inp, avg_inp, slow_inp) IS NOT FALSE AND + IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL + )), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp) AND + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL + )) + ) AS pct_good_cwv +FROM + `chrome-ux-report.materialized.device_summary` +JOIN archive_pages +ON + CONCAT(origin, '/') = url AND + IF(device = 'desktop', 'desktop', 'mobile') = client +JOIN ( + -- Add in top theme name for a theme store id AS this should usually be the real theme name + SELECT + COUNT(DISTINCT url) AS pages_count, + theme_store_id, + theme_name, + row_number() OVER (PARTITION BY theme_store_id ORDER BY COUNT(DISTINCT url) DESC) AS rank + FROM archive_pages + GROUP BY + theme_store_id, + theme_name + ORDER BY COUNT(DISTINCT url) DESC +) theme_names +-- Include null theme store ids so that we can get full market share within CrUX +ON IFNULL(theme_names.theme_store_id, 'N/A') = IFNULL(archive_pages.theme_store_id, 'N/A') +WHERE + date = '${YYYY-MM-DD}' AND + theme_names.rank = 1 +GROUP BY + client, + id, + top_theme_name +ORDER BY + origins DESC diff --git a/sql/histograms/dcl.sql b/migrated_sql/histograms/dcl.sql similarity index 97% rename from sql/histograms/dcl.sql rename to migrated_sql/histograms/dcl.sql index 4e587ee..38e57da 100644 --- a/sql/histograms/dcl.sql +++ b/migrated_sql/histograms/dcl.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/evalJs.sql b/migrated_sql/histograms/evalJs.sql similarity index 97% rename from sql/histograms/evalJs.sql rename to migrated_sql/histograms/evalJs.sql index 356905a..8bfdeda 100644 --- a/sql/histograms/evalJs.sql +++ b/migrated_sql/histograms/evalJs.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/fcp.sql b/migrated_sql/histograms/fcp.sql similarity index 97% rename from sql/histograms/fcp.sql rename to migrated_sql/histograms/fcp.sql index 015426d..9232ff4 100644 --- a/sql/histograms/fcp.sql +++ b/migrated_sql/histograms/fcp.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/gzipSavings.sql b/migrated_sql/histograms/gzipSavings.sql similarity index 97% rename from sql/histograms/gzipSavings.sql rename to migrated_sql/histograms/gzipSavings.sql index 81b173e..0452eb4 100644 --- a/sql/histograms/gzipSavings.sql +++ b/migrated_sql/histograms/gzipSavings.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/htmlElementPopularity.sql b/migrated_sql/histograms/htmlElementPopularity.sql similarity index 98% rename from sql/histograms/htmlElementPopularity.sql rename to migrated_sql/histograms/htmlElementPopularity.sql index 4e6618c..1ff23d9 100644 --- a/sql/histograms/htmlElementPopularity.sql +++ b/migrated_sql/histograms/htmlElementPopularity.sql @@ -1,4 +1,3 @@ -#standardSQL CREATE TEMPORARY FUNCTION getElements(payload STRING) RETURNS ARRAY LANGUAGE js AS ''' try { diff --git a/sql/histograms/imgSavings.sql b/migrated_sql/histograms/imgSavings.sql similarity index 97% rename from sql/histograms/imgSavings.sql rename to migrated_sql/histograms/imgSavings.sql index df93fe4..b55f2c2 100644 --- a/sql/histograms/imgSavings.sql +++ b/migrated_sql/histograms/imgSavings.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/offscreenImages.sql b/migrated_sql/histograms/offscreenImages.sql similarity index 98% rename from sql/histograms/offscreenImages.sql rename to migrated_sql/histograms/offscreenImages.sql index 18dda95..6371022 100644 --- a/sql/histograms/offscreenImages.sql +++ b/migrated_sql/histograms/offscreenImages.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/ol.sql b/migrated_sql/histograms/ol.sql similarity index 97% rename from sql/histograms/ol.sql rename to migrated_sql/histograms/ol.sql index 825943a..e52e81d 100644 --- a/sql/histograms/ol.sql +++ b/migrated_sql/histograms/ol.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/optimizedImages.sql b/migrated_sql/histograms/optimizedImages.sql similarity index 98% rename from sql/histograms/optimizedImages.sql rename to migrated_sql/histograms/optimizedImages.sql index bb5ffca..5462965 100644 --- a/sql/histograms/optimizedImages.sql +++ b/migrated_sql/histograms/optimizedImages.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/reqCss.sql b/migrated_sql/histograms/reqCss.sql similarity index 96% rename from sql/histograms/reqCss.sql rename to migrated_sql/histograms/reqCss.sql index 861fe81..184d822 100644 --- a/sql/histograms/reqCss.sql +++ b/migrated_sql/histograms/reqCss.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/reqFont.sql b/migrated_sql/histograms/reqFont.sql similarity index 97% rename from sql/histograms/reqFont.sql rename to migrated_sql/histograms/reqFont.sql index 145e2b6..1a83554 100644 --- a/sql/histograms/reqFont.sql +++ b/migrated_sql/histograms/reqFont.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/reqHtml.sql b/migrated_sql/histograms/reqHtml.sql similarity index 97% rename from sql/histograms/reqHtml.sql rename to migrated_sql/histograms/reqHtml.sql index 82dd5a2..5fb934f 100644 --- a/sql/histograms/reqHtml.sql +++ b/migrated_sql/histograms/reqHtml.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/reqImg.sql b/migrated_sql/histograms/reqImg.sql similarity index 96% rename from sql/histograms/reqImg.sql rename to migrated_sql/histograms/reqImg.sql index 5409c83..a4bc578 100644 --- a/sql/histograms/reqImg.sql +++ b/migrated_sql/histograms/reqImg.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/reqJs.sql b/migrated_sql/histograms/reqJs.sql similarity index 96% rename from sql/histograms/reqJs.sql rename to migrated_sql/histograms/reqJs.sql index 8dfc12e..5d2c015 100644 --- a/sql/histograms/reqJs.sql +++ b/migrated_sql/histograms/reqJs.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/reqOther.sql b/migrated_sql/histograms/reqOther.sql similarity index 97% rename from sql/histograms/reqOther.sql rename to migrated_sql/histograms/reqOther.sql index caa9944..3450a00 100644 --- a/sql/histograms/reqOther.sql +++ b/migrated_sql/histograms/reqOther.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/reqTotal.sql b/migrated_sql/histograms/reqTotal.sql similarity index 97% rename from sql/histograms/reqTotal.sql rename to migrated_sql/histograms/reqTotal.sql index df0987f..f30ab10 100644 --- a/sql/histograms/reqTotal.sql +++ b/migrated_sql/histograms/reqTotal.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/reqVideo.sql b/migrated_sql/histograms/reqVideo.sql similarity index 97% rename from sql/histograms/reqVideo.sql rename to migrated_sql/histograms/reqVideo.sql index 3f83c74..86ff5fc 100644 --- a/sql/histograms/reqVideo.sql +++ b/migrated_sql/histograms/reqVideo.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/speedIndex.sql b/migrated_sql/histograms/speedIndex.sql similarity index 97% rename from sql/histograms/speedIndex.sql rename to migrated_sql/histograms/speedIndex.sql index 6740961..6b2fec1 100644 --- a/sql/histograms/speedIndex.sql +++ b/migrated_sql/histograms/speedIndex.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/tcp.sql b/migrated_sql/histograms/tcp.sql similarity index 97% rename from sql/histograms/tcp.sql rename to migrated_sql/histograms/tcp.sql index ea80501..d2333d6 100644 --- a/sql/histograms/tcp.sql +++ b/migrated_sql/histograms/tcp.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/ttci.sql b/migrated_sql/histograms/ttci.sql similarity index 98% rename from sql/histograms/ttci.sql rename to migrated_sql/histograms/ttci.sql index 7ba6de1..8a59c43 100644 --- a/sql/histograms/ttci.sql +++ b/migrated_sql/histograms/ttci.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/timeseries/a11yButtonName.sql b/migrated_sql/timeseries/a11yButtonName.sql similarity index 97% rename from sql/timeseries/a11yButtonName.sql rename to migrated_sql/timeseries/a11yButtonName.sql index 5dedac5..b707702 100644 --- a/sql/timeseries/a11yButtonName.sql +++ b/migrated_sql/timeseries/a11yButtonName.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/a11yColorContrast.sql b/migrated_sql/timeseries/a11yColorContrast.sql similarity index 97% rename from sql/timeseries/a11yColorContrast.sql rename to migrated_sql/timeseries/a11yColorContrast.sql index 132d9ff..f3fe6a8 100644 --- a/sql/timeseries/a11yColorContrast.sql +++ b/migrated_sql/timeseries/a11yColorContrast.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/a11yImageAlt.sql b/migrated_sql/timeseries/a11yImageAlt.sql similarity index 97% rename from sql/timeseries/a11yImageAlt.sql rename to migrated_sql/timeseries/a11yImageAlt.sql index 94c3347..1960eaf 100644 --- a/sql/timeseries/a11yImageAlt.sql +++ b/migrated_sql/timeseries/a11yImageAlt.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/a11yLabel.sql b/migrated_sql/timeseries/a11yLabel.sql similarity index 97% rename from sql/timeseries/a11yLabel.sql rename to migrated_sql/timeseries/a11yLabel.sql index f6b29c0..2328733 100644 --- a/sql/timeseries/a11yLabel.sql +++ b/migrated_sql/timeseries/a11yLabel.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/a11yLinkName.sql b/migrated_sql/timeseries/a11yLinkName.sql similarity index 97% rename from sql/timeseries/a11yLinkName.sql rename to migrated_sql/timeseries/a11yLinkName.sql index 7063087..b478178 100644 --- a/sql/timeseries/a11yLinkName.sql +++ b/migrated_sql/timeseries/a11yLinkName.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/a11yScores.sql b/migrated_sql/timeseries/a11yScores.sql similarity index 98% rename from sql/timeseries/a11yScores.sql rename to migrated_sql/timeseries/a11yScores.sql index 4296313..2f81554 100644 --- a/sql/timeseries/a11yScores.sql +++ b/migrated_sql/timeseries/a11yScores.sql @@ -1,4 +1,3 @@ -#standardSQL # Lighthouse changed format of scores in v3.0.0 released in July 2018 so handle old with a UDF CREATE TEMPORARY FUNCTION getA11yScore(reportCategories JSON) RETURNS FLOAT64 DETERMINISTIC diff --git a/sql/timeseries/asyncClipboardRead.sql b/migrated_sql/timeseries/asyncClipboardRead.sql similarity index 97% rename from sql/timeseries/asyncClipboardRead.sql rename to migrated_sql/timeseries/asyncClipboardRead.sql index c712e87..b4ee3ae 100644 --- a/sql/timeseries/asyncClipboardRead.sql +++ b/migrated_sql/timeseries/asyncClipboardRead.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/badgeClear.sql b/migrated_sql/timeseries/badgeClear.sql similarity index 97% rename from sql/timeseries/badgeClear.sql rename to migrated_sql/timeseries/badgeClear.sql index a8514f0..da30a41 100644 --- a/sql/timeseries/badgeClear.sql +++ b/migrated_sql/timeseries/badgeClear.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/badgeSet.sql b/migrated_sql/timeseries/badgeSet.sql similarity index 97% rename from sql/timeseries/badgeSet.sql rename to migrated_sql/timeseries/badgeSet.sql index 7655f7b..86f38b3 100644 --- a/sql/timeseries/badgeSet.sql +++ b/migrated_sql/timeseries/badgeSet.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/bootupJs.sql b/migrated_sql/timeseries/bootupJs.sql similarity index 98% rename from sql/timeseries/bootupJs.sql rename to migrated_sql/timeseries/bootupJs.sql index d035216..7159cc0 100644 --- a/sql/timeseries/bootupJs.sql +++ b/migrated_sql/timeseries/bootupJs.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/bytesCss.sql b/migrated_sql/timeseries/bytesCss.sql similarity index 98% rename from sql/timeseries/bytesCss.sql rename to migrated_sql/timeseries/bytesCss.sql index 57f8bdc..4eaf7b8 100644 --- a/sql/timeseries/bytesCss.sql +++ b/migrated_sql/timeseries/bytesCss.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/bytesFont.sql b/migrated_sql/timeseries/bytesFont.sql similarity index 98% rename from sql/timeseries/bytesFont.sql rename to migrated_sql/timeseries/bytesFont.sql index f3e4ea9..d6ce226 100644 --- a/sql/timeseries/bytesFont.sql +++ b/migrated_sql/timeseries/bytesFont.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/bytesHtml.sql b/migrated_sql/timeseries/bytesHtml.sql similarity index 98% rename from sql/timeseries/bytesHtml.sql rename to migrated_sql/timeseries/bytesHtml.sql index 133941c..7a131b1 100644 --- a/sql/timeseries/bytesHtml.sql +++ b/migrated_sql/timeseries/bytesHtml.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/bytesImg.sql b/migrated_sql/timeseries/bytesImg.sql similarity index 98% rename from sql/timeseries/bytesImg.sql rename to migrated_sql/timeseries/bytesImg.sql index f71309d..ae350bd 100644 --- a/sql/timeseries/bytesImg.sql +++ b/migrated_sql/timeseries/bytesImg.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/bytesJs.sql b/migrated_sql/timeseries/bytesJs.sql similarity index 98% rename from sql/timeseries/bytesJs.sql rename to migrated_sql/timeseries/bytesJs.sql index 17896c7..feec23b 100644 --- a/sql/timeseries/bytesJs.sql +++ b/migrated_sql/timeseries/bytesJs.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/bytesOther.sql b/migrated_sql/timeseries/bytesOther.sql similarity index 98% rename from sql/timeseries/bytesOther.sql rename to migrated_sql/timeseries/bytesOther.sql index 378b52b..cedbe40 100644 --- a/sql/timeseries/bytesOther.sql +++ b/migrated_sql/timeseries/bytesOther.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/bytesTotal.sql b/migrated_sql/timeseries/bytesTotal.sql similarity index 100% rename from sql/timeseries/bytesTotal.sql rename to migrated_sql/timeseries/bytesTotal.sql diff --git a/sql/timeseries/bytesVideo.sql b/migrated_sql/timeseries/bytesVideo.sql similarity index 98% rename from sql/timeseries/bytesVideo.sql rename to migrated_sql/timeseries/bytesVideo.sql index e5bbcfd..8d93414 100644 --- a/sql/timeseries/bytesVideo.sql +++ b/migrated_sql/timeseries/bytesVideo.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/canonical.sql b/migrated_sql/timeseries/canonical.sql similarity index 97% rename from sql/timeseries/canonical.sql rename to migrated_sql/timeseries/canonical.sql index 3f2ae72..7e960ff 100644 --- a/sql/timeseries/canonical.sql +++ b/migrated_sql/timeseries/canonical.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/contentIndex.sql b/migrated_sql/timeseries/contentIndex.sql similarity index 97% rename from sql/timeseries/contentIndex.sql rename to migrated_sql/timeseries/contentIndex.sql index d46a73d..b925f63 100644 --- a/sql/timeseries/contentIndex.sql +++ b/migrated_sql/timeseries/contentIndex.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/dcl.sql b/migrated_sql/timeseries/dcl.sql similarity index 98% rename from sql/timeseries/dcl.sql rename to migrated_sql/timeseries/dcl.sql index 1b54d01..5bb26b2 100644 --- a/sql/timeseries/dcl.sql +++ b/migrated_sql/timeseries/dcl.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/fcp.sql b/migrated_sql/timeseries/fcp.sql similarity index 98% rename from sql/timeseries/fcp.sql rename to migrated_sql/timeseries/fcp.sql index ee9a719..bbaf7b0 100644 --- a/sql/timeseries/fcp.sql +++ b/migrated_sql/timeseries/fcp.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/fontDisplay.sql b/migrated_sql/timeseries/fontDisplay.sql similarity index 97% rename from sql/timeseries/fontDisplay.sql rename to migrated_sql/timeseries/fontDisplay.sql index 4f1bb67..72f9dd9 100644 --- a/sql/timeseries/fontDisplay.sql +++ b/migrated_sql/timeseries/fontDisplay.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/getInstalledRelatedApps.sql b/migrated_sql/timeseries/getInstalledRelatedApps.sql similarity index 97% rename from sql/timeseries/getInstalledRelatedApps.sql rename to migrated_sql/timeseries/getInstalledRelatedApps.sql index b17be36..9e8b394 100644 --- a/sql/timeseries/getInstalledRelatedApps.sql +++ b/migrated_sql/timeseries/getInstalledRelatedApps.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/gzipSavings.sql b/migrated_sql/timeseries/gzipSavings.sql similarity index 98% rename from sql/timeseries/gzipSavings.sql rename to migrated_sql/timeseries/gzipSavings.sql index 0bd63ac..6bf878d 100644 --- a/sql/timeseries/gzipSavings.sql +++ b/migrated_sql/timeseries/gzipSavings.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/h2.sql b/migrated_sql/timeseries/h2.sql similarity index 97% rename from sql/timeseries/h2.sql rename to migrated_sql/timeseries/h2.sql index 2ce3681..076d1ce 100644 --- a/sql/timeseries/h2.sql +++ b/migrated_sql/timeseries/h2.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/h3.sql b/migrated_sql/timeseries/h3.sql similarity index 99% rename from sql/timeseries/h3.sql rename to migrated_sql/timeseries/h3.sql index dd15274..b919a01 100644 --- a/sql/timeseries/h3.sql +++ b/migrated_sql/timeseries/h3.sql @@ -1,4 +1,3 @@ -#standardSQL # The amount of requests either using HTTP/3 or able to use it. # # We measure "ability to use" as well as "actual use", as HTTP Archive is a diff --git a/sql/timeseries/hreflang.sql b/migrated_sql/timeseries/hreflang.sql similarity index 97% rename from sql/timeseries/hreflang.sql rename to migrated_sql/timeseries/hreflang.sql index ae4b1ed..9049bc5 100644 --- a/sql/timeseries/hreflang.sql +++ b/migrated_sql/timeseries/hreflang.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/idleDetection.sql b/migrated_sql/timeseries/idleDetection.sql similarity index 97% rename from sql/timeseries/idleDetection.sql rename to migrated_sql/timeseries/idleDetection.sql index 70464a1..46b8fd7 100644 --- a/sql/timeseries/idleDetection.sql +++ b/migrated_sql/timeseries/idleDetection.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/imgLazy.sql b/migrated_sql/timeseries/imgLazy.sql similarity index 97% rename from sql/timeseries/imgLazy.sql rename to migrated_sql/timeseries/imgLazy.sql index 5498477..0277a3c 100644 --- a/sql/timeseries/imgLazy.sql +++ b/migrated_sql/timeseries/imgLazy.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/imgSavings.sql b/migrated_sql/timeseries/imgSavings.sql similarity index 98% rename from sql/timeseries/imgSavings.sql rename to migrated_sql/timeseries/imgSavings.sql index 99c3788..57095f0 100644 --- a/sql/timeseries/imgSavings.sql +++ b/migrated_sql/timeseries/imgSavings.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/legible.sql b/migrated_sql/timeseries/legible.sql similarity index 97% rename from sql/timeseries/legible.sql rename to migrated_sql/timeseries/legible.sql index dd29a47..b7f788f 100644 --- a/sql/timeseries/legible.sql +++ b/migrated_sql/timeseries/legible.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/linkText.sql b/migrated_sql/timeseries/linkText.sql similarity index 97% rename from sql/timeseries/linkText.sql rename to migrated_sql/timeseries/linkText.sql index d7f2114..9d148de 100644 --- a/sql/timeseries/linkText.sql +++ b/migrated_sql/timeseries/linkText.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/notificationTriggers.sql b/migrated_sql/timeseries/notificationTriggers.sql similarity index 97% rename from sql/timeseries/notificationTriggers.sql rename to migrated_sql/timeseries/notificationTriggers.sql index 3a1cd98..ca4b7b3 100644 --- a/sql/timeseries/notificationTriggers.sql +++ b/migrated_sql/timeseries/notificationTriggers.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/numUrls.sql b/migrated_sql/timeseries/numUrls.sql similarity index 95% rename from sql/timeseries/numUrls.sql rename to migrated_sql/timeseries/numUrls.sql index df992df..8a658c1 100644 --- a/sql/timeseries/numUrls.sql +++ b/migrated_sql/timeseries/numUrls.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/offscreenImages.sql b/migrated_sql/timeseries/offscreenImages.sql similarity index 99% rename from sql/timeseries/offscreenImages.sql rename to migrated_sql/timeseries/offscreenImages.sql index 7594029..7abef76 100644 --- a/sql/timeseries/offscreenImages.sql +++ b/migrated_sql/timeseries/offscreenImages.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/ol.sql b/migrated_sql/timeseries/ol.sql similarity index 98% rename from sql/timeseries/ol.sql rename to migrated_sql/timeseries/ol.sql index 95c67ce..6b2b583 100644 --- a/sql/timeseries/ol.sql +++ b/migrated_sql/timeseries/ol.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/optimizedImages.sql b/migrated_sql/timeseries/optimizedImages.sql similarity index 99% rename from sql/timeseries/optimizedImages.sql rename to migrated_sql/timeseries/optimizedImages.sql index aee6ae8..215dc2b 100644 --- a/sql/timeseries/optimizedImages.sql +++ b/migrated_sql/timeseries/optimizedImages.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/pctHttps.sql b/migrated_sql/timeseries/pctHttps.sql similarity index 97% rename from sql/timeseries/pctHttps.sql rename to migrated_sql/timeseries/pctHttps.sql index 5ac3b7b..96fe1db 100644 --- a/sql/timeseries/pctHttps.sql +++ b/migrated_sql/timeseries/pctHttps.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/periodicBackgroundSync.sql b/migrated_sql/timeseries/periodicBackgroundSync.sql similarity index 97% rename from sql/timeseries/periodicBackgroundSync.sql rename to migrated_sql/timeseries/periodicBackgroundSync.sql index 5004969..008b19f 100644 --- a/sql/timeseries/periodicBackgroundSync.sql +++ b/migrated_sql/timeseries/periodicBackgroundSync.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/periodicBackgroundSyncRegister.sql b/migrated_sql/timeseries/periodicBackgroundSyncRegister.sql similarity index 97% rename from sql/timeseries/periodicBackgroundSyncRegister.sql rename to migrated_sql/timeseries/periodicBackgroundSyncRegister.sql index 99a25f0..0d041d4 100644 --- a/sql/timeseries/periodicBackgroundSyncRegister.sql +++ b/migrated_sql/timeseries/periodicBackgroundSyncRegister.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/quicTransport.sql b/migrated_sql/timeseries/quicTransport.sql similarity index 97% rename from sql/timeseries/quicTransport.sql rename to migrated_sql/timeseries/quicTransport.sql index e49ed8f..22b46c6 100644 --- a/sql/timeseries/quicTransport.sql +++ b/migrated_sql/timeseries/quicTransport.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/reqCss.sql b/migrated_sql/timeseries/reqCss.sql similarity index 98% rename from sql/timeseries/reqCss.sql rename to migrated_sql/timeseries/reqCss.sql index 7c0dc8a..3f38bd5 100644 --- a/sql/timeseries/reqCss.sql +++ b/migrated_sql/timeseries/reqCss.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/reqFont.sql b/migrated_sql/timeseries/reqFont.sql similarity index 98% rename from sql/timeseries/reqFont.sql rename to migrated_sql/timeseries/reqFont.sql index a490a83..56d74f1 100644 --- a/sql/timeseries/reqFont.sql +++ b/migrated_sql/timeseries/reqFont.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/reqHtml.sql b/migrated_sql/timeseries/reqHtml.sql similarity index 98% rename from sql/timeseries/reqHtml.sql rename to migrated_sql/timeseries/reqHtml.sql index a564e22..dfe3506 100644 --- a/sql/timeseries/reqHtml.sql +++ b/migrated_sql/timeseries/reqHtml.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/reqImg.sql b/migrated_sql/timeseries/reqImg.sql similarity index 98% rename from sql/timeseries/reqImg.sql rename to migrated_sql/timeseries/reqImg.sql index c23bedd..d40e6cc 100644 --- a/sql/timeseries/reqImg.sql +++ b/migrated_sql/timeseries/reqImg.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/reqJs.sql b/migrated_sql/timeseries/reqJs.sql similarity index 98% rename from sql/timeseries/reqJs.sql rename to migrated_sql/timeseries/reqJs.sql index 8abacce..7e95ac4 100644 --- a/sql/timeseries/reqJs.sql +++ b/migrated_sql/timeseries/reqJs.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/reqOther.sql b/migrated_sql/timeseries/reqOther.sql similarity index 98% rename from sql/timeseries/reqOther.sql rename to migrated_sql/timeseries/reqOther.sql index fcd6073..58242ab 100644 --- a/sql/timeseries/reqOther.sql +++ b/migrated_sql/timeseries/reqOther.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/reqTotal.sql b/migrated_sql/timeseries/reqTotal.sql similarity index 98% rename from sql/timeseries/reqTotal.sql rename to migrated_sql/timeseries/reqTotal.sql index 372baaf..9f54812 100644 --- a/sql/timeseries/reqTotal.sql +++ b/migrated_sql/timeseries/reqTotal.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/reqVideo.sql b/migrated_sql/timeseries/reqVideo.sql similarity index 98% rename from sql/timeseries/reqVideo.sql rename to migrated_sql/timeseries/reqVideo.sql index cefd474..52f62b3 100644 --- a/sql/timeseries/reqVideo.sql +++ b/migrated_sql/timeseries/reqVideo.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/screenWakeLock.sql b/migrated_sql/timeseries/screenWakeLock.sql similarity index 97% rename from sql/timeseries/screenWakeLock.sql rename to migrated_sql/timeseries/screenWakeLock.sql index 6946319..169338d 100644 --- a/sql/timeseries/screenWakeLock.sql +++ b/migrated_sql/timeseries/screenWakeLock.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/speedIndex.sql b/migrated_sql/timeseries/speedIndex.sql similarity index 98% rename from sql/timeseries/speedIndex.sql rename to migrated_sql/timeseries/speedIndex.sql index a6902df..e6bd292 100644 --- a/sql/timeseries/speedIndex.sql +++ b/migrated_sql/timeseries/speedIndex.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/storageEstimate.sql b/migrated_sql/timeseries/storageEstimate.sql similarity index 97% rename from sql/timeseries/storageEstimate.sql rename to migrated_sql/timeseries/storageEstimate.sql index 6731a6d..090a675 100644 --- a/sql/timeseries/storageEstimate.sql +++ b/migrated_sql/timeseries/storageEstimate.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/storagePersist.sql b/migrated_sql/timeseries/storagePersist.sql similarity index 97% rename from sql/timeseries/storagePersist.sql rename to migrated_sql/timeseries/storagePersist.sql index 168c2f0..eeed1da 100644 --- a/sql/timeseries/storagePersist.sql +++ b/migrated_sql/timeseries/storagePersist.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/swControlledPages.sql b/migrated_sql/timeseries/swControlledPages.sql similarity index 97% rename from sql/timeseries/swControlledPages.sql rename to migrated_sql/timeseries/swControlledPages.sql index 7355a79..5ad90d9 100644 --- a/sql/timeseries/swControlledPages.sql +++ b/migrated_sql/timeseries/swControlledPages.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/tcp.sql b/migrated_sql/timeseries/tcp.sql similarity index 98% rename from sql/timeseries/tcp.sql rename to migrated_sql/timeseries/tcp.sql index bf22f1f..b6c18c3 100644 --- a/sql/timeseries/tcp.sql +++ b/migrated_sql/timeseries/tcp.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/ttci.sql b/migrated_sql/timeseries/ttci.sql similarity index 98% rename from sql/timeseries/ttci.sql rename to migrated_sql/timeseries/ttci.sql index 1ed7e73..2e29aa5 100644 --- a/sql/timeseries/ttci.sql +++ b/migrated_sql/timeseries/ttci.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/timeseries/webSocketStream.sql b/migrated_sql/timeseries/webSocketStream.sql similarity index 97% rename from sql/timeseries/webSocketStream.sql rename to migrated_sql/timeseries/webSocketStream.sql index 7a99e89..e881bcc 100644 --- a/sql/timeseries/webSocketStream.sql +++ b/migrated_sql/timeseries/webSocketStream.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT FORMAT_TIMESTAMP('%Y_%m_%d', date) AS date, UNIX_DATE(date) * 1000 * 60 * 60 * 24 AS timestamp, diff --git a/sql/get_bigquery_dates.sh b/sql/get_bigquery_dates.sh index 1e39fbd..643a86b 100755 --- a/sql/get_bigquery_dates.sh +++ b/sql/get_bigquery_dates.sh @@ -57,7 +57,6 @@ if [ ! -z "$MIN" ] || [ ! -z "$MAX" ]; then fi query=$(cat <>) RETURNS ARRAY> LANGUAGE js AS """ diff --git a/sql/histograms/cruxDcl.sql b/sql/histograms/cruxDcl.sql index 38bba60..b4dac0d 100644 --- a/sql/histograms/cruxDcl.sql +++ b/sql/histograms/cruxDcl.sql @@ -1,4 +1,3 @@ -#standardSQL CREATE TEMPORARY FUNCTION spreadBins(bins ARRAY>) RETURNS ARRAY> LANGUAGE js AS """ diff --git a/sql/histograms/cruxFcp.sql b/sql/histograms/cruxFcp.sql index da9928f..c70406e 100644 --- a/sql/histograms/cruxFcp.sql +++ b/sql/histograms/cruxFcp.sql @@ -1,4 +1,3 @@ -#standardSQL CREATE TEMPORARY FUNCTION spreadBins(bins ARRAY>) RETURNS ARRAY> LANGUAGE js AS """ diff --git a/sql/histograms/cruxFp.sql b/sql/histograms/cruxFp.sql index 1fb7f14..a9007c7 100644 --- a/sql/histograms/cruxFp.sql +++ b/sql/histograms/cruxFp.sql @@ -1,4 +1,3 @@ -#standardSQL CREATE TEMPORARY FUNCTION spreadBins(bins ARRAY>) RETURNS ARRAY> LANGUAGE js AS """ diff --git a/sql/histograms/cruxInp.sql b/sql/histograms/cruxInp.sql index abe8f4d..1d29e50 100644 --- a/sql/histograms/cruxInp.sql +++ b/sql/histograms/cruxInp.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/histograms/cruxLcp.sql b/sql/histograms/cruxLcp.sql index e78cad5..ad2edad 100644 --- a/sql/histograms/cruxLcp.sql +++ b/sql/histograms/cruxLcp.sql @@ -1,4 +1,3 @@ -#standardSQL CREATE TEMPORARY FUNCTION spreadBins(bins ARRAY>) RETURNS ARRAY> LANGUAGE js AS """ diff --git a/sql/histograms/cruxOl.sql b/sql/histograms/cruxOl.sql index a36b72a..794840a 100644 --- a/sql/histograms/cruxOl.sql +++ b/sql/histograms/cruxOl.sql @@ -1,4 +1,3 @@ -#standardSQL CREATE TEMPORARY FUNCTION spreadBins(bins ARRAY>) RETURNS ARRAY> LANGUAGE js AS """ diff --git a/sql/histograms/cruxShopifyThemes.sql b/sql/histograms/cruxShopifyThemes.sql index 7b71403..1db39b8 100644 --- a/sql/histograms/cruxShopifyThemes.sql +++ b/sql/histograms/cruxShopifyThemes.sql @@ -1,4 +1,3 @@ -#standardSQL -- Core web vitals by Shopify theme CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( good / (good + needs_improvement + poor) >= 0.75 diff --git a/sql/histograms/cruxTtfb.sql b/sql/histograms/cruxTtfb.sql index c3b60cc..811a78c 100644 --- a/sql/histograms/cruxTtfb.sql +++ b/sql/histograms/cruxTtfb.sql @@ -1,4 +1,3 @@ -#standardSQL SELECT *, SUM(pdf) OVER (PARTITION BY client ORDER BY bin) AS cdf diff --git a/sql/timeseries/cruxFastDcl.sql b/sql/timeseries/cruxFastDcl.sql index 7b96217..e3a8127 100644 --- a/sql/timeseries/cruxFastDcl.sql +++ b/sql/timeseries/cruxFastDcl.sql @@ -1,4 +1,3 @@ -#standardSQL # Fast Dopm Content Loaded by device CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxFastFcp.sql b/sql/timeseries/cruxFastFcp.sql index 770615f..6772005 100644 --- a/sql/timeseries/cruxFastFcp.sql +++ b/sql/timeseries/cruxFastFcp.sql @@ -1,4 +1,3 @@ -#standardSQL # Fast FCP by device CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxFastFp.sql b/sql/timeseries/cruxFastFp.sql index 21374f4..fb1aaa0 100644 --- a/sql/timeseries/cruxFastFp.sql +++ b/sql/timeseries/cruxFastFp.sql @@ -1,4 +1,3 @@ -#standardSQL # Fast First Paint by device CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxFastInp.sql b/sql/timeseries/cruxFastInp.sql index 15cd260..693b04e 100644 --- a/sql/timeseries/cruxFastInp.sql +++ b/sql/timeseries/cruxFastInp.sql @@ -1,4 +1,3 @@ -#standardSQL # Small CLS by device CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxFastLcp.sql b/sql/timeseries/cruxFastLcp.sql index 0f3ada7..06fb43d 100644 --- a/sql/timeseries/cruxFastLcp.sql +++ b/sql/timeseries/cruxFastLcp.sql @@ -1,4 +1,3 @@ -#standardSQL # Fast LCP by device CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxFastOl.sql b/sql/timeseries/cruxFastOl.sql index f5ced70..018d400 100644 --- a/sql/timeseries/cruxFastOl.sql +++ b/sql/timeseries/cruxFastOl.sql @@ -1,4 +1,3 @@ -#standardSQL # Fast Onload by device CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxFastTtfb.sql b/sql/timeseries/cruxFastTtfb.sql index 6f544d5..06a38b6 100644 --- a/sql/timeseries/cruxFastTtfb.sql +++ b/sql/timeseries/cruxFastTtfb.sql @@ -1,4 +1,3 @@ -#standardSQL # Small CLS by device CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxLargeCls.sql b/sql/timeseries/cruxLargeCls.sql index af561e6..67a7906 100644 --- a/sql/timeseries/cruxLargeCls.sql +++ b/sql/timeseries/cruxLargeCls.sql @@ -1,4 +1,3 @@ -#standardSQL # Large CLS by device CREATE TEMP FUNCTION IS_POOR(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxPassesCWV.sql b/sql/timeseries/cruxPassesCWV.sql index 4952126..e119712 100644 --- a/sql/timeseries/cruxPassesCWV.sql +++ b/sql/timeseries/cruxPassesCWV.sql @@ -1,4 +1,3 @@ -#standardSQL # Passes Core Web Vitals by device CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxSlowFcp.sql b/sql/timeseries/cruxSlowFcp.sql index 2232997..1d7d064 100644 --- a/sql/timeseries/cruxSlowFcp.sql +++ b/sql/timeseries/cruxSlowFcp.sql @@ -1,4 +1,3 @@ -#standardSQL # Slow FCP by device CREATE TEMP FUNCTION IS_POOR(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxSlowInp.sql b/sql/timeseries/cruxSlowInp.sql index 188bd07..e8a1564 100644 --- a/sql/timeseries/cruxSlowInp.sql +++ b/sql/timeseries/cruxSlowInp.sql @@ -1,4 +1,3 @@ -#standardSQL # Large CLS by device CREATE TEMP FUNCTION IS_POOR(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxSlowLcp.sql b/sql/timeseries/cruxSlowLcp.sql index 16d6229..f936f3f 100644 --- a/sql/timeseries/cruxSlowLcp.sql +++ b/sql/timeseries/cruxSlowLcp.sql @@ -1,4 +1,3 @@ -#standardSQL # Slow LCP by device CREATE TEMP FUNCTION IS_POOR(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxSlowTtfb.sql b/sql/timeseries/cruxSlowTtfb.sql index d0959d8..5e9198c 100644 --- a/sql/timeseries/cruxSlowTtfb.sql +++ b/sql/timeseries/cruxSlowTtfb.sql @@ -1,4 +1,3 @@ -#standardSQL # Large CLS by device CREATE TEMP FUNCTION IS_POOR(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( diff --git a/sql/timeseries/cruxSmallCls.sql b/sql/timeseries/cruxSmallCls.sql index fe987a9..e2875c9 100644 --- a/sql/timeseries/cruxSmallCls.sql +++ b/sql/timeseries/cruxSmallCls.sql @@ -1,4 +1,3 @@ -#standardSQL # Small CLS by device CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS (