diff --git a/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_daily_v1/query.sql b/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_daily_v1/query.sql index 6a77a3a261..1340501a84 100644 --- a/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_daily_v1/query.sql +++ b/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_daily_v1/query.sql @@ -56,13 +56,10 @@ windowed AS ( udf.mode_last(ARRAY_AGG(country) OVER w1) AS country, udf_contains_tier1_country(ARRAY_AGG(country) OVER w1) AS seen_in_tier1_country, LOGICAL_OR(event_name = 'reg_complete') OVER w1 AS registered, - ARRAY_AGG(event_name) OVER w1 AS service_events, FROM fxa_events WHERE DATE(submission_timestamp) = @submission_date - AND user_id_sha256 != '' - AND service != '' QUALIFY ROW_NUMBER() OVER ( PARTITION BY @@ -88,16 +85,9 @@ windowed AS ( SELECT DATE(@submission_date) AS submission_date, windowed.user_id_sha256, - oa.name AS service, + windowed.service, windowed.country, windowed.seen_in_tier1_country, windowed.registered, - windowed.service_events, FROM windowed -JOIN - `accounts_db.fxa_oauth_clients` AS oa - ON windowed.service = oa.id -WHERE - user_id_sha256 IS NOT NULL - AND service IS NOT NULL diff --git a/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_daily_v1/schema.yaml b/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_daily_v1/schema.yaml index 07e00bc48f..c581d37c4d 100644 --- a/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_daily_v1/schema.yaml +++ b/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_daily_v1/schema.yaml @@ -17,6 +17,3 @@ fields: - name: registered type: BOOLEAN mode: NULLABLE -- name: service_events - type: STRING - mode: REPEATED diff --git a/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_last_seen_v1/query.sql b/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_last_seen_v1/query.sql index f6feda2a5d..92e14902f5 100644 --- a/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_last_seen_v1/query.sql +++ b/sql/moz-fx-data-shared-prod/accounts_backend_derived/users_services_last_seen_v1/query.sql @@ -1,18 +1,6 @@ -CREATE TEMP FUNCTION contains_qualified_fxa_activity_event(events ANY TYPE) AS ( - EXISTS( - SELECT - event_type - FROM - UNNEST(events) AS event_type - WHERE - event_type IN ('login_complete', 'reg_complete') - OR (event_type LIKE r'access\_token%') - ) -); - WITH _current AS ( SELECT - * EXCEPT (submission_date, registered, seen_in_tier1_country, service_events), + * EXCEPT (submission_date, registered, seen_in_tier1_country), -- In this raw table, we capture the history of activity over the past -- 28 days for each usage criterion as a single 64-bit integer. The -- rightmost bit represents whether the user was active in the current day. @@ -27,7 +15,6 @@ WITH _current AS ( accounts_backend_derived.users_services_daily_v1 WHERE submission_date = @submission_date - AND contains_qualified_fxa_activity_event(service_events) ), _previous AS ( SELECT