-
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:HTTPArchive/almanac.httparchive.org…
… into production
- Loading branch information
Showing
74 changed files
with
2,074 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#standardSQL | ||
# 13_03: Timeseries to show eCommerce growth acceleration due to Covid-19 | ||
# Excluding apps which are not eCommerce platforms/vendors themselves but are used to identify eCommerce sites. These are signals added in Wappalyzer in 2020 to get better idea on % of eCommerce sites but these are not relevant for vendor % market share analysis | ||
SELECT | ||
IF(ENDS_WITH(_TABLE_SUFFIX, '_desktop'), 'desktop', 'mobile') AS client, | ||
COUNT(DISTINCT url) AS freq, | ||
total, | ||
COUNT(DISTINCT url) / total AS pct, | ||
2020 AS year, | ||
LEFT(_TABLE_SUFFIX, 2) AS month, | ||
FROM | ||
`httparchive.technologies.2020_*` | ||
JOIN | ||
(SELECT | ||
_TABLE_SUFFIX, | ||
COUNT(DISTINCT url) AS total | ||
FROM | ||
`httparchive.summary_pages.2020_*` | ||
GROUP BY | ||
_TABLE_SUFFIX) | ||
USING (_TABLE_SUFFIX) | ||
WHERE | ||
category = 'Ecommerce' | ||
GROUP BY | ||
client, | ||
year, | ||
month, | ||
total | ||
|
||
UNION ALL | ||
|
||
SELECT | ||
IF(ENDS_WITH(_TABLE_SUFFIX, '_desktop'), 'desktop', 'mobile') AS client, | ||
COUNT(DISTINCT url) AS freq, | ||
total, | ||
COUNT(DISTINCT url) / total AS pct, | ||
2019 AS year, | ||
LEFT(_TABLE_SUFFIX, 2) AS month, | ||
FROM | ||
`httparchive.technologies.2019_*` | ||
JOIN | ||
(SELECT | ||
_TABLE_SUFFIX, | ||
COUNT(DISTINCT url) AS total | ||
FROM | ||
`httparchive.summary_pages.2019_*` | ||
GROUP BY | ||
_TABLE_SUFFIX) | ||
USING (_TABLE_SUFFIX) | ||
WHERE | ||
category = 'Ecommerce' | ||
GROUP BY | ||
client, | ||
year, | ||
month, | ||
total | ||
|
||
ORDER BY | ||
year DESC, | ||
month DESC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#standardSQL | ||
# 13_04: Timeseries to show eCommerce vendors growth acceleration due to Covid-19 | ||
# Excluding apps which are not eCommerce platforms/vendors themselves but are used to identify eCommerce sites. These are signals added in Wappalyzer in 2020 to get better idea on % of eCommerce sites but these are not relevant for vendor % market share analysis | ||
# Limiting to top 5000 records to continue further analysis in Google Sheets. Using HAVING clauses based on 'pct' results in missing data for certain months | ||
SELECT | ||
IF(ENDS_WITH(_TABLE_SUFFIX, '_desktop'), 'desktop', 'mobile') AS client, | ||
app, | ||
COUNT(DISTINCT url) AS freq, | ||
total, | ||
COUNT(DISTINCT url) / total AS pct, | ||
LEFT(_TABLE_SUFFIX, 4) AS year, | ||
SUBSTR(_TABLE_SUFFIX, 6, 2) AS month, | ||
FROM | ||
`httparchive.technologies.*` | ||
JOIN | ||
(SELECT | ||
_TABLE_SUFFIX, | ||
COUNT(DISTINCT url) AS total | ||
FROM | ||
`httparchive.summary_pages.*` | ||
GROUP BY | ||
_TABLE_SUFFIX) | ||
USING (_TABLE_SUFFIX) | ||
WHERE | ||
category = 'Ecommerce' AND | ||
(app != 'Cart Functionality' AND | ||
app != 'Google Analytics Enhanced eCommerce') | ||
GROUP BY | ||
client, | ||
app, | ||
year, | ||
month, | ||
total | ||
ORDER BY | ||
pct DESC, | ||
client DESC, | ||
app DESC | ||
LIMIT 5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.