Skip to content

Commit

Permalink
font 2020 queries-add (#1669)
Browse files Browse the repository at this point in the history
* web_font_breakdown_2019

* Update sql/2020/04_Fonts/04_05a.web_font_usage_breakdown_2019.sql

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
  • Loading branch information
AbbyTsai and tunetheweb committed Dec 8, 2020
1 parent 4e2f236 commit 23987a0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions sql/2020/04_Fonts/04_05a.web_font_usage_breakdown_2019.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#standardSQL
#web_font_usage_breakdown_2019
SELECT
client,
NET.HOST(url) AS host,
COUNT(DISTINCT page) AS pages,
SUM(COUNT(DISTINCT page)) OVER (PARTITION BY client) AS total,
COUNT(DISTINCT page) / SUM(COUNT(DISTINCT page)) OVER (PARTITION BY client) AS pct,
FROM
`httparchive.almanac.requests`
WHERE
date = '2019-07-01' AND
type = 'font' AND
NET.HOST(page) != NET.HOST(url)
GROUP BY
client, url, page
HAVING
pages >= 1000
ORDER BY
pct DESC

0 comments on commit 23987a0

Please sign in to comment.