-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DENG-6880 updates to include new fields and aggregations
- Loading branch information
Showing
3 changed files
with
1,077 additions
and
0 deletions.
There are no files selected for viewing
101 changes: 101 additions & 0 deletions
101
sql/moz-fx-data-shared-prod/telemetry_derived/newtab_clients_daily_aggregates_v2/query.sql
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,101 @@ | ||
SELECT | ||
submission_date, | ||
normalized_os, | ||
normalized_os_version, | ||
country_code, | ||
locale, | ||
channel, | ||
browser_version, | ||
browser_name, | ||
default_search_engine, | ||
default_private_search_engine, | ||
pocket_is_signed_in, | ||
pocket_enabled, | ||
pocket_sponsored_stories_enabled, | ||
topsites_enabled, | ||
topsites_sponsored_enabled, | ||
newtab_homepage_category, | ||
newtab_newtab_category, | ||
topsites_rows, | ||
is_new_profile, | ||
activity_segment, | ||
COUNT(DISTINCT client_id) AS client_count, | ||
COUNT(DISTINCT legacy_telemetry_client_id) AS legacy_telemetry_client_count, | ||
SUM(newtab_visit_count) AS newtab_visit_count, | ||
SUM(visits_with_non_impression_engagement) AS visits_with_non_impression_engagement, | ||
SUM(visits_with_non_search_engagement) AS visits_with_non_search_engagement, | ||
SUM(searches) AS searches, | ||
SUM(tagged_search_ad_clicks) AS tagged_search_ad_clicks, | ||
SUM(tagged_search_ad_impressions) AS tagged_search_ad_impressions, | ||
SUM(follow_on_search_ad_clicks) AS follow_on_search_ad_clicks, | ||
SUM(follow_on_search_ad_impressions) AS follow_on_search_ad_impressions, | ||
SUM(tagged_follow_on_search_ad_clicks) AS tagged_follow_on_search_ad_clicks, | ||
SUM(tagged_follow_on_search_ad_impressions) AS tagged_follow_on_search_ad_impressions, | ||
SUM(topsite_tile_clicks) AS topsite_tile_clicks, | ||
SUM(sponsored_topsite_tile_clicks) AS sponsored_topsite_tile_clicks, | ||
SUM(organic_topsite_tile_clicks) AS organic_topsite_tile_clicks, | ||
SUM(topsite_tile_impressions) AS topsite_tile_impressions, | ||
SUM(sponsored_topsite_tile_impressions) AS sponsored_topsite_tile_impressions, | ||
SUM(organic_topsite_tile_impressions) AS organic_topsite_tile_impressions, | ||
SUM(topsite_tile_dismissals) AS topsite_tile_dismissals, | ||
SUM(sponsored_topsite_tile_dismissals) AS sponsored_topsite_tile_dismissals, | ||
SUM(organic_topsite_tile_dismissals) AS organic_topsite_tile_dismissals, | ||
SUM(pocket_impressions) AS pocket_impressions, | ||
SUM(sponsored_pocket_impressions) AS sponsored_pocket_impressions, | ||
SUM(organic_pocket_impressions) AS organic_pocket_impressions, | ||
SUM(pocket_clicks) AS pocket_clicks, | ||
SUM(sponsored_pocket_clicks) AS sponsored_pocket_clicks, | ||
SUM(organic_pocket_clicks) AS organic_pocket_clicks, | ||
SUM(pocket_saves) AS pocket_saves, | ||
SUM(sponsored_pocket_saves) AS sponsored_pocket_saves, | ||
SUM(organic_pocket_saves) AS organic_pocket_saves, | ||
|
||
-- New additions | ||
sum(pocket_thumb_voting_events) as pocket_thumb_voting_events, | ||
sum(topic_selection_opened) as topic_selection_opened, | ||
sum(topic_selection_updates) as topic_selection_updates, | ||
sum(weather_widget_clicks) as weather_widget_clicks, | ||
sum(weather_widget_change_display_to_detailed) as weather_widget_change_display_to_detailed, | ||
sum(weather_widget_change_display_to_simple) as weather_widget_change_display_to_simple, | ||
sum(wallpaper_clicks) as wallpaper_clicks, | ||
sum(topic_selection_selected_topics_first_time) as topic_selection_selected_topics_first_time, | ||
sum(sponsored_pocket_dismissals) as sponsored_pocket_dismissals, | ||
sum(organic_pocket_dismissals) as organic_pocket_dismissals, | ||
sum(topic_selection_dismissals) as topic_selection_dismissals, | ||
|
||
sum(visits_with_default_ui) as visits_with_default_ui, | ||
sum(topic_selection_opened) as topic_selection_opened, | ||
sum(topic_selection_opened) as topic_selection_opened, | ||
sum(topic_selection_opened) as topic_selection_opened, | ||
sum(topic_selection_opened) as topic_selection_opened, | ||
sum(topic_selection_opened) as topic_selection_opened, | ||
|
||
FROM | ||
`moz-fx-data-shared-prod.telemetry_derived.newtab_clients_daily_v1` | ||
WHERE | ||
{% if is_init() %} | ||
submission_date >= "2022-11-01" | ||
{% else %} | ||
submission_date = @submission_date | ||
{% endif %} | ||
GROUP BY | ||
submission_date, | ||
normalized_os, | ||
normalized_os_version, | ||
country_code, | ||
locale, | ||
channel, | ||
browser_version, | ||
browser_name, | ||
default_search_engine, | ||
default_private_search_engine, | ||
pocket_is_signed_in, | ||
pocket_enabled, | ||
pocket_sponsored_stories_enabled, | ||
topsites_enabled, | ||
topsites_sponsored_enabled, | ||
newtab_homepage_category, | ||
newtab_newtab_category, | ||
topsites_rows, | ||
is_new_profile, | ||
activity_segment |
Oops, something went wrong.