diff --git a/sql/2019/14_CMS/14_13d.sql b/sql/2019/14_CMS/14_13d.sql new file mode 100644 index 00000000000..31ff1f06dc8 --- /dev/null +++ b/sql/2019/14_CMS/14_13d.sql @@ -0,0 +1,25 @@ +#standardSQL +# 14_13d: Distribution of image stats per CMS +SELECT + percentile, + _TABLE_SUFFIX AS client, + app, + COUNT(DISTINCT url) AS pages, + APPROX_QUANTILES(reqImg, 1000)[OFFSET(percentile * 10)] AS image_count, + ROUND(APPROX_QUANTILES(bytesImg, 1000)[OFFSET(percentile * 10)] / 1024, 2) AS image_kbytes +FROM + `httparchive.summary_pages.2019_07_01_*` +JOIN + `httparchive.technologies.2019_07_01_*` +USING (_TABLE_SUFFIX, url), +UNNEST([10, 25, 50, 75, 90]) AS percentile +WHERE + category = 'CMS' +GROUP BY + percentile, + client, + app +ORDER BY + percentile, + client, + pages DESC \ No newline at end of file diff --git a/sql/2019/14_CMS/14_14b.sql b/sql/2019/14_CMS/14_14b.sql new file mode 100644 index 00000000000..0e98d9376ed --- /dev/null +++ b/sql/2019/14_CMS/14_14b.sql @@ -0,0 +1,23 @@ +#standardSQL +# 14_14b: Distribution of HTML kilobytes per CMS per page +SELECT + _TABLE_SUFFIX AS client, + app, + COUNT(DISTINCT url) AS pages, + ROUND(APPROX_QUANTILES(bytesHtml, 1000)[OFFSET(100)] / 1024, 2) AS p10, + ROUND(APPROX_QUANTILES(bytesHtml, 1000)[OFFSET(250)] / 1024, 2) AS p25, + ROUND(APPROX_QUANTILES(bytesHtml, 1000)[OFFSET(500)] / 1024, 2) AS p50, + ROUND(APPROX_QUANTILES(bytesHtml, 1000)[OFFSET(750)] / 1024, 2) AS p75, + ROUND(APPROX_QUANTILES(bytesHtml, 1000)[OFFSET(900)] / 1024, 2) AS p90 +FROM + `httparchive.summary_pages.2019_07_01_*` +JOIN + `httparchive.technologies.2019_07_01_*` +USING (_TABLE_SUFFIX, url) +WHERE + category = 'CMS' +GROUP BY + client, + app +ORDER BY + pages DESC \ No newline at end of file diff --git a/sql/2019/14_CMS/14_18b.sql b/sql/2019/14_CMS/14_18b.sql new file mode 100644 index 00000000000..7bd7657c6af --- /dev/null +++ b/sql/2019/14_CMS/14_18b.sql @@ -0,0 +1,23 @@ +#standardSQL +# 14_18b: Lighthouse indexability scores by CMS +SELECT + app, + COUNTIF(crawlable = '1') AS passing, + COUNT(0) AS total, + ROUND(COUNTIF(crawlable = '1') * 100 / COUNT(0) , 2) AS pct +FROM + `httparchive.technologies.2019_07_01_mobile` +JOIN ( + SELECT + url, + JSON_EXTRACT_SCALAR(report, '$.audits.is-crawlable.score') AS crawlable + FROM + `httparchive.lighthouse.2019_07_01_mobile`) +USING (url) +WHERE + category = 'CMS' AND + crawlable IS NOT NULL +GROUP BY + app +ORDER BY + total DESC \ No newline at end of file diff --git a/sql/2019/14_CMS/14_19b.sql b/sql/2019/14_CMS/14_19b.sql new file mode 100644 index 00000000000..ebd4ab5972d --- /dev/null +++ b/sql/2019/14_CMS/14_19b.sql @@ -0,0 +1,17 @@ +#standardSQL +# 14_19b: Lighthouse PWA scores by CMS +SELECT + app, + APPROX_QUANTILES(CAST(JSON_EXTRACT_SCALAR(report, "$.categories.pwa.score") AS NUMERIC), 1000)[OFFSET(501)] AS median_pwa_score, + COUNT(0) AS pages +FROM + `httparchive.lighthouse.2019_07_01_mobile` +LEFT JOIN + `httparchive.technologies.2019_07_01_mobile` +USING (url) +WHERE + category = 'CMS' +GROUP BY + app +ORDER BY + pages DESC \ No newline at end of file