* Indent join conditions.

* Put parentheses around some `BETWEEN ... AND ...` join conditions.
This commit is contained in:
Sean Rose 2024-01-11 15:50:26 -08:00 коммит произвёл GitHub
Родитель 6bf9506ad7
Коммит 1d1addb86c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
312 изменённых файлов: 873 добавлений и 1678 удалений

Просмотреть файл

@ -57,9 +57,8 @@ WITH
`{live_table}`
JOIN
distinct_document_ids
USING
-- Retain only the first seen documents for each ID, according to timestamp.
(document_id, submission_timestamp)
USING (document_id, submission_timestamp)
WHERE
submission_timestamp >= @start_time
AND submission_timestamp < @end_time),

Просмотреть файл

@ -55,7 +55,6 @@ TOP_LEVEL_KEYWORDS = [
"LEFT JOIN",
"LEFT OUTER JOIN",
"LIMIT",
"ON",
"ORDER BY",
"OUTER JOIN",
"PARTITION BY",
@ -76,7 +75,6 @@ TOP_LEVEL_KEYWORDS = [
"UNION ALL",
"UNION DISTINCT",
"UNION",
"USING",
"VALUES",
"WHERE",
"WITH(?! OFFSET)",
@ -84,6 +82,8 @@ TOP_LEVEL_KEYWORDS = [
]
# These words start a new line at the current indent
NEWLINE_KEYWORDS = [
"ON",
"USING",
"WITH OFFSET",
# UDF
"CREATE OR REPLACE",

Просмотреть файл

@ -5,8 +5,7 @@
{% if filter_version %}
LEFT JOIN
glam_etl.{{ prefix }}__latest_versions_v1
USING
(channel)
USING (channel)
{% endif %}
WHERE
-- allow for builds to be slighly ahead of the current submission date, to
@ -124,5 +123,4 @@ FROM
filtered_accumulated AS accumulated
FULL OUTER JOIN
transformed_daily AS daily
USING
({{ attributes }})
USING ({{ attributes }})

Просмотреть файл

@ -5,8 +5,7 @@
{% if filter_version %}
LEFT JOIN
glam_etl.{{ prefix }}__latest_versions_v1
USING
(channel)
USING (channel)
{% endif %}
WHERE
-- allow for builds to be slighly ahead of the current submission date, to
@ -112,8 +111,7 @@ joined_new_old AS (
filtered_new AS new_data
FULL OUTER JOIN
filtered_old AS old_data
USING
({{ attributes }})
USING ({{ attributes }})
)
SELECT
{{ attributes }},

Просмотреть файл

@ -110,5 +110,4 @@ FROM
records
LEFT OUTER JOIN
distribution_metadata
USING
(metric_type, metric)
USING (metric_type, metric)

Просмотреть файл

@ -47,5 +47,4 @@ FROM
with_build_hour
JOIN
with_geckoview_version_renamed
USING
(build_hour)
USING (build_hour)

Просмотреть файл

@ -47,5 +47,4 @@ FROM
with_build_hour
JOIN
with_geckoview_version_renamed
USING
(build_hour)
USING (build_hour)

Просмотреть файл

@ -22,8 +22,7 @@ valid_clients_scalar_aggregates AS (
{{ source_table }}
INNER JOIN
build_ids
USING
(app_build_id, channel)
USING (app_build_id, channel)
),
bucketed_booleans AS (
SELECT

Просмотреть файл

@ -239,8 +239,7 @@ def delete_from_partition(
+ " AND ".join((source_condition, *source.conditions))
+ f"""
)
ON
{field} = _source_{index}
ON {field} = _source_{index}
"""
for index, (field, source) in enumerate(zip(target.fields, sources))
)

Просмотреть файл

@ -35,8 +35,7 @@ WHERE
JOIN_TEMPLATE = """
FULL JOIN
{table}
USING
({fields})
USING ({fields})
"""

Просмотреть файл

@ -79,8 +79,7 @@ filtered_accumulated AS (
extracted_accumulated
LEFT JOIN
glam_etl.firefox_desktop_glam_nightly__latest_versions_v1
USING
(channel)
USING (channel)
WHERE
-- allow for builds to be slighly ahead of the current submission date, to
-- account for a reasonable amount of clock skew
@ -120,8 +119,7 @@ filtered_daily AS (
extracted_daily
LEFT JOIN
glam_etl.firefox_desktop_glam_nightly__latest_versions_v1
USING
(channel)
USING (channel)
WHERE
-- allow for builds to be slighly ahead of the current submission date, to
-- account for a reasonable amount of clock skew
@ -208,5 +206,4 @@ FROM
filtered_accumulated AS accumulated
FULL OUTER JOIN
transformed_daily AS daily
USING
(sample_id, client_id, ping_type, os, app_version, app_build_id, channel)
USING (sample_id, client_id, ping_type, os, app_version, app_build_id, channel)

Просмотреть файл

@ -132,8 +132,7 @@ version_filtered_new AS (
filtered_aggregates AS scalar_aggs
LEFT JOIN
glam_etl.firefox_desktop_glam_nightly__latest_versions_v1
USING
(channel)
USING (channel)
WHERE
-- allow for builds to be slighly ahead of the current submission date, to
-- account for a reasonable amount of clock skew
@ -216,8 +215,7 @@ filtered_old AS (
glam_etl.firefox_desktop_glam_nightly__clients_scalar_aggregates_v1 AS scalar_aggs
LEFT JOIN
glam_etl.firefox_desktop_glam_nightly__latest_versions_v1
USING
(channel)
USING (channel)
WHERE
-- allow for builds to be slighly ahead of the current submission date, to
-- account for a reasonable amount of clock skew
@ -243,8 +241,7 @@ joined_new_old AS (
filtered_new AS new_data
FULL OUTER JOIN
filtered_old AS old_data
USING
(client_id, ping_type, os, app_version, app_build_id, channel)
USING (client_id, ping_type, os, app_version, app_build_id, channel)
)
SELECT
client_id,

Просмотреть файл

@ -84,8 +84,7 @@ unnested AS (
UNNEST(aggregates) AS aggregates
INNER JOIN
build_ids
USING
(app_build_id, channel)
USING (app_build_id, channel)
),
-- Find information that can be used to construct the bucket range. Most of the
-- distributions follow a bucketing rule of 8*log2(n). This doesn't apply to the
@ -290,5 +289,4 @@ FROM
records
LEFT OUTER JOIN
distribution_metadata
USING
(metric_type, metric)
USING (metric_type, metric)

Просмотреть файл

@ -191,8 +191,7 @@ bucketed_scalars AS (
UNNEST(scalar_aggregates)
LEFT JOIN
buckets_by_metric
USING
(metric, key)
USING (metric, key)
WHERE
metric_type IN ("counter", "quantity", "labeled_counter", "timespan")
),
@ -242,8 +241,7 @@ valid_booleans_scalars AS (
booleans_and_scalars
INNER JOIN
build_ids
USING
(app_build_id, channel)
USING (app_build_id, channel)
)
SELECT
ping_type,

Просмотреть файл

@ -79,8 +79,7 @@ filtered_accumulated AS (
extracted_accumulated
LEFT JOIN
glam_etl.org_mozilla_fenix_glam_nightly__latest_versions_v1
USING
(channel)
USING (channel)
WHERE
-- allow for builds to be slighly ahead of the current submission date, to
-- account for a reasonable amount of clock skew
@ -120,8 +119,7 @@ filtered_daily AS (
extracted_daily
LEFT JOIN
glam_etl.org_mozilla_fenix_glam_nightly__latest_versions_v1
USING
(channel)
USING (channel)
WHERE
-- allow for builds to be slighly ahead of the current submission date, to
-- account for a reasonable amount of clock skew
@ -208,5 +206,4 @@ FROM
filtered_accumulated AS accumulated
FULL OUTER JOIN
transformed_daily AS daily
USING
(sample_id, client_id, ping_type, os, app_version, app_build_id, channel)
USING (sample_id, client_id, ping_type, os, app_version, app_build_id, channel)

Просмотреть файл

@ -132,8 +132,7 @@ version_filtered_new AS (
filtered_aggregates AS scalar_aggs
LEFT JOIN
glam_etl.org_mozilla_fenix_glam_nightly__latest_versions_v1
USING
(channel)
USING (channel)
WHERE
-- allow for builds to be slighly ahead of the current submission date, to
-- account for a reasonable amount of clock skew
@ -216,8 +215,7 @@ filtered_old AS (
glam_etl.org_mozilla_fenix_glam_nightly__clients_scalar_aggregates_v1 AS scalar_aggs
LEFT JOIN
glam_etl.org_mozilla_fenix_glam_nightly__latest_versions_v1
USING
(channel)
USING (channel)
WHERE
-- allow for builds to be slighly ahead of the current submission date, to
-- account for a reasonable amount of clock skew
@ -243,8 +241,7 @@ joined_new_old AS (
filtered_new AS new_data
FULL OUTER JOIN
filtered_old AS old_data
USING
(client_id, ping_type, os, app_version, app_build_id, channel)
USING (client_id, ping_type, os, app_version, app_build_id, channel)
)
SELECT
client_id,

Просмотреть файл

@ -84,8 +84,7 @@ unnested AS (
UNNEST(aggregates) AS aggregates
INNER JOIN
build_ids
USING
(app_build_id, channel)
USING (app_build_id, channel)
),
-- Find information that can be used to construct the bucket range. Most of the
-- distributions follow a bucketing rule of 8*log2(n). This doesn't apply to the
@ -274,5 +273,4 @@ FROM
records
LEFT OUTER JOIN
distribution_metadata
USING
(metric_type, metric)
USING (metric_type, metric)

Просмотреть файл

@ -93,8 +93,7 @@ valid_clients_scalar_aggregates AS (
glam_etl.org_mozilla_fenix_glam_nightly__clients_scalar_aggregates_v1
INNER JOIN
build_ids
USING
(app_build_id, channel)
USING (app_build_id, channel)
),
bucketed_booleans AS (
SELECT
@ -167,8 +166,7 @@ bucketed_scalars AS (
UNNEST(scalar_aggregates)
LEFT JOIN
buckets_by_metric
USING
(metric, key)
USING (metric, key)
WHERE
metric_type IN ("counter", "quantity", "labeled_counter", "timespan")
),

Просмотреть файл

@ -47,5 +47,4 @@ FROM
with_build_hour
JOIN
with_geckoview_version_renamed
USING
(build_hour)
USING (build_hour)

Просмотреть файл

@ -47,5 +47,4 @@ FROM
with_build_hour
JOIN
with_geckoview_version_renamed
USING
(build_hour)
USING (build_hour)

Просмотреть файл

@ -9,16 +9,13 @@ FROM
`moz-fx-data-shared-prod`.stripe_external.nonprod_refund_v1 AS refund
JOIN
`moz-fx-data-shared-prod`.stripe_external.nonprod_charge_v1 AS charge
ON
refund.charge_id = charge.id
ON refund.charge_id = charge.id
JOIN
`moz-fx-data-shared-prod`.stripe_external.nonprod_invoice_v1 AS invoice
ON
charge.invoice_id = invoice.id
ON charge.invoice_id = invoice.id
JOIN
EXTERNAL_QUERY(
"moz-fx-cjms-nonprod-9a36.us.cjms-sql",
"SELECT subscription_id FROM subscriptions"
)
USING
(subscription_id)
USING (subscription_id)

Просмотреть файл

@ -25,8 +25,7 @@ aic_flows AS (
flows_live
JOIN
EXTERNAL_QUERY("moz-fx-cjms-nonprod-9a36.us.cjms-sql", "SELECT flow_id FROM aic")
USING
(flow_id)
USING (flow_id)
WHERE
-- only use the last 10 days in stage
submission_date >= CURRENT_DATE - 10
@ -45,8 +44,7 @@ attributed_flows AS (
aic_flows
JOIN
`moz-fx-data-shared-prod`.subscription_platform_derived.nonprod_stripe_subscriptions_v1 AS subscriptions
ON
aic_flows.fxa_uid = subscriptions.fxa_uid
ON aic_flows.fxa_uid = subscriptions.fxa_uid
AND aic_flows.flow_started < subscriptions.created
GROUP BY
subscription_id,
@ -72,8 +70,7 @@ initial_invoices AS (
attributed_subs
JOIN
`moz-fx-data-shared-prod`.stripe_external.nonprod_invoice_v1 AS invoices
USING
(subscription_id)
USING (subscription_id)
QUALIFY
1 = ROW_NUMBER() OVER (PARTITION BY subscription_id ORDER BY invoices.created)
),
@ -87,16 +84,13 @@ initial_discounts AS (
initial_invoices
JOIN
`moz-fx-data-shared-prod`.stripe_external.nonprod_invoice_discount_v1 AS invoice_discounts
USING
(invoice_id)
USING (invoice_id)
JOIN
`moz-fx-data-shared-prod`.stripe_external.nonprod_promotion_code_v1 AS promotion_codes
ON
invoice_discounts.promotion_code = promotion_codes.id
ON invoice_discounts.promotion_code = promotion_codes.id
JOIN
`moz-fx-data-shared-prod`.stripe_external.nonprod_coupon_v1 AS coupons
ON
promotion_codes.coupon_id = coupons.id
ON promotion_codes.coupon_id = coupons.id
),
promotion_codes AS (
SELECT
@ -127,8 +121,7 @@ percent_discounts AS (
initial_discounts AS discounts
JOIN
`moz-fx-data-shared-prod`.subscription_platform_derived.nonprod_stripe_subscriptions_v1 AS subscriptions
USING
(subscription_id)
USING (subscription_id)
WHERE
discounts.percent_off IS NOT NULL
GROUP BY
@ -156,17 +149,13 @@ FROM
attributed_subs
JOIN
`moz-fx-data-shared-prod`.subscription_platform_derived.nonprod_stripe_subscriptions_v1 AS subscriptions
USING
(subscription_id)
USING (subscription_id)
LEFT JOIN
promotion_codes
USING
(subscription_id)
USING (subscription_id)
LEFT JOIN
amount_discounts
USING
(subscription_id)
USING (subscription_id)
LEFT JOIN
percent_discounts
USING
(subscription_id, subscription_item_id)
USING (subscription_id, subscription_item_id)

Просмотреть файл

@ -9,13 +9,10 @@ FROM
`moz-fx-data-shared-prod`.stripe_external.refund_v1 AS refund
JOIN
`moz-fx-data-shared-prod`.stripe_external.charge_v1 AS charge
ON
refund.charge_id = charge.id
ON refund.charge_id = charge.id
JOIN
`moz-fx-data-shared-prod`.stripe_external.invoice_v1 AS invoice
ON
charge.invoice_id = invoice.id
ON charge.invoice_id = invoice.id
JOIN
EXTERNAL_QUERY("moz-fx-cjms-prod-f3c7.us.cjms-sql", "SELECT subscription_id FROM subscriptions")
USING
(subscription_id)
USING (subscription_id)

Просмотреть файл

@ -10,8 +10,7 @@ WITH aic_flows AS (
`moz-fx-cjms-prod-f3c7`.cjms_bigquery.flows_v1
JOIN
EXTERNAL_QUERY("moz-fx-cjms-prod-f3c7.us.cjms-sql", "SELECT flow_id FROM aic")
USING
(flow_id)
USING (flow_id)
WHERE
-- use the last 31 days in prod
submission_date >= CURRENT_DATE - 31
@ -30,8 +29,7 @@ attributed_flows AS (
aic_flows
JOIN
`moz-fx-data-shared-prod`.subscription_platform_derived.stripe_subscriptions_v1 AS subscriptions
ON
aic_flows.fxa_uid = subscriptions.fxa_uid
ON aic_flows.fxa_uid = subscriptions.fxa_uid
AND aic_flows.flow_started < subscriptions.created
GROUP BY
subscription_id,
@ -57,8 +55,7 @@ initial_invoices AS (
attributed_subs
JOIN
`moz-fx-data-shared-prod`.stripe_external.invoice_v1 AS invoices
USING
(subscription_id)
USING (subscription_id)
QUALIFY
1 = ROW_NUMBER() OVER (PARTITION BY subscription_id ORDER BY invoices.created)
),
@ -72,16 +69,13 @@ initial_discounts AS (
initial_invoices
JOIN
`moz-fx-data-shared-prod`.stripe_external.invoice_discount_v1 AS invoice_discounts
USING
(invoice_id)
USING (invoice_id)
JOIN
`moz-fx-data-shared-prod`.stripe_external.promotion_code_v1 AS promotion_codes
ON
invoice_discounts.promotion_code = promotion_codes.id
ON invoice_discounts.promotion_code = promotion_codes.id
JOIN
`moz-fx-data-shared-prod`.stripe_external.coupon_v1 AS coupons
ON
promotion_codes.coupon_id = coupons.id
ON promotion_codes.coupon_id = coupons.id
),
promotion_codes AS (
SELECT
@ -112,8 +106,7 @@ percent_discounts AS (
initial_discounts AS discounts
JOIN
`moz-fx-data-shared-prod`.subscription_platform_derived.stripe_subscriptions_v1 AS subscriptions
USING
(subscription_id)
USING (subscription_id)
WHERE
discounts.percent_off IS NOT NULL
GROUP BY
@ -141,17 +134,13 @@ FROM
attributed_subs
JOIN
`moz-fx-data-shared-prod`.subscription_platform_derived.stripe_subscriptions_v1 AS subscriptions
USING
(subscription_id)
USING (subscription_id)
LEFT JOIN
promotion_codes
USING
(subscription_id)
USING (subscription_id)
LEFT JOIN
amount_discounts
USING
(subscription_id)
USING (subscription_id)
LEFT JOIN
percent_discounts
USING
(subscription_id, subscription_item_id)
USING (subscription_id, subscription_item_id)

Просмотреть файл

@ -52,8 +52,7 @@ FROM
distinct_rc
FULL OUTER JOIN
recent_tests
USING
(framework, platform, test_name, test_type, test_extra_options, subtest_name)
USING (framework, platform, test_name, test_type, test_extra_options, subtest_name)
WHERE
distinct_rc.rc_test_name IS NULL
OR distinct_rc.defined_criteria > 1

Просмотреть файл

@ -84,8 +84,14 @@ stage_2 AS (
WHERE
STARTS_WITH(app_name, 'target')
) AS b
USING
(task_group_id, project, normalized_device_name, normalized_device_os, rc_tier, rc_test_name)
USING (
task_group_id,
project,
normalized_device_name,
normalized_device_os,
rc_tier,
rc_test_name
)
WHERE
NOT STARTS_WITH(app_name, 'target')
),

Просмотреть файл

@ -41,8 +41,7 @@ rc_test_data AS (
rc_flattened_test_data_v1 AS flattened
LEFT JOIN
rc_included_tests AS included_rc
ON
flattened.framework = included_rc.framework
ON flattened.framework = included_rc.framework
AND flattened.platform = included_rc.platform
AND flattened.normalized_test_type = included_rc.test_type
AND flattened.test_name = included_rc.test_name
@ -298,8 +297,7 @@ rc_tests_with_tested_version AS (
rc_tests
LEFT JOIN
versions
ON
date_utc = DATE(task_group_time)
ON date_utc = DATE(task_group_time)
AND (
(project IN ('fenix', 'mozilla-central', 'mozilla-beta', 'autoland') AND category = 'dev')
OR (project = 'mozilla-release' AND category = 'stability')

Просмотреть файл

@ -14,8 +14,7 @@ FROM
`ga-mozilla-org-prod-001.Adjust.deliverable_*` AS adjust
LEFT JOIN
`moz-fx-data-shared-prod.static.country_codes_v1` AS country
ON
UPPER(adjust.country) = country.code
ON UPPER(adjust.country) = country.code
WHERE
adjust.app = 'Firefox Android and iOS'
AND adjust._TABLE_SUFFIX >= '20220101'

Просмотреть файл

@ -9,51 +9,39 @@ FROM
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_by_opt_in_app_referrer`
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_last_30_days_by_opt_in_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.app_units_by_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.deletions_by_opt_in_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.iap_by_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_by_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_unique_device_by_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.installations_by_opt_in_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.paying_users_by_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_by_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_unique_device_by_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sales_by_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sessions_by_opt_in_app_referrer`
USING
(date, app_name, app_referrer)
USING (date, app_name, app_referrer)
WHERE
date = @submission_date

Просмотреть файл

@ -17,23 +17,18 @@ FROM
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_by_opt_in_app_version`
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_last_30_days_by_opt_in_app_version`
USING
(date, app_name, app_version)
USING (date, app_name, app_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.crashes_by_opt_in_app_version`
USING
(date, app_name, app_version)
USING (date, app_name, app_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.deletions_by_opt_in_app_version`
USING
(date, app_name, app_version)
USING (date, app_name, app_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.installations_by_opt_in_app_version`
USING
(date, app_name, app_version)
USING (date, app_name, app_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sessions_by_opt_in_app_version`
USING
(date, app_name, app_version)
USING (date, app_name, app_version)
WHERE
date = @submission_date

Просмотреть файл

@ -9,51 +9,39 @@ FROM
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_by_opt_in_campaign`
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_last_30_days_by_opt_in_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.app_units_by_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.deletions_by_opt_in_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.iap_by_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_by_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_unique_device_by_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.installations_by_opt_in_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.paying_users_by_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_by_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_unique_device_by_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sales_by_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sessions_by_opt_in_campaign`
USING
(date, app_name, campaign)
USING (date, app_name, campaign)
WHERE
date = @submission_date

Просмотреть файл

@ -17,55 +17,42 @@ FROM
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_by_opt_in_platform`
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_last_30_days_by_opt_in_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.app_units_by_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.crashes_by_opt_in_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.deletions_by_opt_in_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.iap_by_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_by_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_unique_device_by_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.installations_by_opt_in_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.paying_users_by_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_by_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_unique_device_by_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sales_by_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sessions_by_opt_in_platform`
USING
(date, app_name, platform)
USING (date, app_name, platform)
WHERE
date = @submission_date

Просмотреть файл

@ -17,55 +17,42 @@ FROM
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_by_opt_in_platform_version`
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_last_30_days_by_opt_in_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.app_units_by_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.crashes_by_opt_in_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.deletions_by_opt_in_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.iap_by_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_by_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_unique_device_by_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.installations_by_opt_in_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.paying_users_by_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_by_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_unique_device_by_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sales_by_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sessions_by_opt_in_platform_version`
USING
(date, app_name, platform_version)
USING (date, app_name, platform_version)
WHERE
date = @submission_date

Просмотреть файл

@ -10,55 +10,42 @@ FROM
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_by_opt_in_region`
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_last_30_days_by_opt_in_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.app_units_by_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.deletions_by_opt_in_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.iap_by_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_by_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_unique_device_by_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.installations_by_opt_in_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.paying_users_by_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_by_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_unique_device_by_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.rate_by_opt_in_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sales_by_region`
USING
(date, app_name, region)
USING (date, app_name, region)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sessions_by_opt_in_region`
USING
(date, app_name, region)
USING (date, app_name, region)
WHERE
date = @submission_date

Просмотреть файл

@ -9,51 +9,39 @@ FROM
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_by_opt_in_source`
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_last_30_days_by_opt_in_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.app_units_by_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.deletions_by_opt_in_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.iap_by_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_by_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_unique_device_by_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.installations_by_opt_in_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.paying_users_by_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_by_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_unique_device_by_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sales_by_source`
USING
(date, app_name, source)
USING (date, app_name, source)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sessions_by_opt_in_source`
USING
(date, app_name, source)
USING (date, app_name, source)
WHERE
date = @submission_date

Просмотреть файл

@ -10,55 +10,42 @@ FROM
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_by_opt_in_storefront`
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_last_30_days_by_opt_in_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.app_units_by_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.deletions_by_opt_in_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.iap_by_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_by_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_unique_device_by_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.installations_by_opt_in_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.paying_users_by_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_by_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_unique_device_by_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.rate_by_opt_in_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sales_by_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sessions_by_opt_in_storefront`
USING
(date, app_name, storefront)
USING (date, app_name, storefront)
WHERE
date = @submission_date

Просмотреть файл

@ -9,51 +9,39 @@ FROM
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_by_opt_in_web_referrer`
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_last_30_days_by_opt_in_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.app_units_by_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.deletions_by_opt_in_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.iap_by_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_by_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_unique_device_by_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.installations_by_opt_in_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.paying_users_by_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_by_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_unique_device_by_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sales_by_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sessions_by_opt_in_web_referrer`
USING
(date, app_name, web_referrer)
USING (date, app_name, web_referrer)
WHERE
date = @submission_date

Просмотреть файл

@ -19,59 +19,45 @@ FROM
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_last_30_days_total`
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.active_devices_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.app_units_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.crashes_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.deletions_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.iap_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.impressions_unique_device_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.installations_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.paying_users_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.product_page_views_unique_device_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.rate_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sales_total`
USING
(date, app_name)
USING (date, app_name)
FULL JOIN
`moz-fx-data-marketing-prod.apple_app_store_exported.sessions_total`
USING
(date, app_name)
USING (date, app_name)
WHERE
date = @submission_date

Просмотреть файл

@ -46,5 +46,4 @@ FROM
LEFT JOIN
-- Join metric / spend data to campaign information data
latest_ingested_metrics AS metric
USING
(AdName)
USING (AdName)

Просмотреть файл

@ -7,5 +7,4 @@ FROM
`moz-fx-data-marketing-prod.fetch.latest_trafficking`
LEFT JOIN
`moz-fx-data-marketing-prod.fetch.latest_metric`
USING
(fetch_id, AdName)
USING (fetch_id, AdName)

Просмотреть файл

@ -25,7 +25,6 @@ FROM
fetch_summary
LEFT JOIN
detailed_summary
USING
(campaign)
USING (campaign)
ORDER BY
fetch_summary_spend DESC

Просмотреть файл

@ -29,8 +29,7 @@ FROM
fetch_summary
LEFT JOIN
detailed_summary
USING
(month, year)
USING (month, year)
ORDER BY
year,
month

Просмотреть файл

@ -20,12 +20,10 @@ FROM
`moz-fx-data-marketing-prod.ga_derived.blogs_sessions_v1` AS sessions_table
LEFT JOIN
`moz-fx-data-marketing-prod.ga_derived.blogs_goals_v1`
USING
(date, visit_identifier)
USING (date, visit_identifier)
LEFT JOIN
`moz-fx-data-shared-prod.static.third_party_standardized_country_names` AS standardized_country_list
ON
sessions_table.country = standardized_country_list.raw_country
ON sessions_table.country = standardized_country_list.raw_country
WHERE
date = @submission_date
GROUP BY

Просмотреть файл

@ -45,16 +45,13 @@ FROM
`moz-fx-data-marketing-prod.ga_derived.blogs_sessions_v1` AS sessions_table
LEFT JOIN
`moz-fx-data-marketing-prod.ga_derived.blogs_goals_v1` AS goals_table
USING
(date, visit_identifier)
USING (date, visit_identifier)
LEFT JOIN
landing_page_table
USING
(date, visit_identifier)
USING (date, visit_identifier)
LEFT JOIN
`moz-fx-data-shared-prod.static.third_party_standardized_country_names` AS standardized_country_list
ON
sessions_table.country = standardized_country_list.raw_country
ON sessions_table.country = standardized_country_list.raw_country
WHERE
date = @submission_date
GROUP BY

Просмотреть файл

@ -101,12 +101,10 @@ ga_sessions_with_hits AS (
ga_sessions ga
LEFT JOIN
pageviews p
USING
(client_id, visit_id)
USING (client_id, visit_id)
JOIN
dl_events
USING
(client_id, visit_id)
USING (client_id, visit_id)
),
stub_dl AS (
SELECT
@ -151,8 +149,7 @@ stub AS (
stub_dl
JOIN
stub_other_dl
USING
(stub_visit_id)
USING (stub_visit_id)
),
-- This will drop all the ga_sessions w/o a DLtoken but keep DLtoken without a GA session.
-- This will also result in multiple rows as the ga.client_id is not unique for the day
@ -189,8 +186,7 @@ downloads_and_ga_session AS (
ga_sessions_with_hits gs
RIGHT JOIN
stub s
ON
gs.client_id = s.stub_visit_id
ON gs.client_id = s.stub_visit_id
GROUP BY
gs.client_id,
dltoken,
@ -341,5 +337,4 @@ FROM
downloads_and_ga_session
LEFT JOIN
`moz-fx-data-shared-prod.static.country_names_v1` AS cn
ON
cn.name = country
ON cn.name = country

Просмотреть файл

@ -132,12 +132,10 @@ ga_sessions_with_hits_fields AS (
ga_session_dimensions ga
LEFT JOIN
page_hits p
USING
(client_id, visit_id)
USING (client_id, visit_id)
JOIN
event_hits
USING
(client_id, visit_id)
USING (client_id, visit_id)
),
-- Extract all the download rows, de-duping and tracking number of duplicates per download token.
stub_downloads AS (
@ -180,8 +178,7 @@ stub_downloads_with_download_tracking AS (
stub_downloads s1
JOIN
multiple_downloads_in_session s2
ON
(
ON (
s1.stub_visit_id = s2.stub_visit_id
AND IFNULL(s1.stub_download_session_id, "null") = IFNULL(s2.stub_download_session_id, "null")
)
@ -221,8 +218,7 @@ downloads_with_ga_session AS (
ga_sessions_with_hits_fields gs
RIGHT JOIN
stub_downloads_with_download_tracking s
ON
(gs.client_id = s.stub_visit_id AND gs.download_session_id = s.stub_download_session_id)
ON (gs.client_id = s.stub_visit_id AND gs.download_session_id = s.stub_download_session_id)
GROUP BY
gs.client_id,
dltoken,
@ -285,8 +281,7 @@ v2_table AS (
downloads_with_ga_session
LEFT JOIN
`moz-fx-data-shared-prod.static.country_names_v1` AS cn
ON
cn.name = country
ON cn.name = country
),
-- Some of the joins for v2_table as not successful due to the GA data not including
-- the download_session_id. The downloads which are unable to match to a GA session
@ -303,8 +298,7 @@ extract_dltoken_missing_ga_client AS (
v2_table v2
JOIN
stub_downloads_with_download_tracking s
ON
(s.dltoken = v2.dltoken)
ON (s.dltoken = v2.dltoken)
WHERE
join_result_v2 = 'MISSING_GA_CLIENT_OR_SESSION_ID'
),
@ -338,8 +332,7 @@ v1_downloads_with_ga_session AS (
ga_sessions_with_hits_fields gs
RIGHT JOIN
extract_dltoken_missing_ga_client s
ON
gs.client_id = s.stub_visit_id
ON gs.client_id = s.stub_visit_id
GROUP BY
gs.client_id,
stub_visit_id,
@ -387,8 +380,7 @@ v1_table AS (
v1_downloads_with_ga_session
LEFT JOIN
`moz-fx-data-shared-prod.static.country_names_v1` AS cn
ON
cn.name = country
ON cn.name = country
)
SELECT
* EXCEPT (join_result_v1),

Просмотреть файл

@ -115,16 +115,13 @@ joined_table AS (
sessions_table
FULL JOIN
`moz-fx-data-marketing-prod.ga_derived.www_site_downloads_v1` AS downloads_table
USING
(date, visit_identifier)
USING (date, visit_identifier)
FULL JOIN
pageviews_table
USING
(date, visit_identifier)
USING (date, visit_identifier)
FULL JOIN
bounces_table
USING
(date, visit_identifier)
USING (date, visit_identifier)
WHERE
-- To minimize table size, filtering for sessions != 0
sessions_table.sessions != 0

Просмотреть файл

@ -79,8 +79,7 @@ site_data AS (
sessions_table
LEFT JOIN
download_aggregates
ON
sessions_table.date = download_aggregates.date
ON sessions_table.date = download_aggregates.date
AND sessions_table.device_category = download_aggregates.device_category
AND sessions_table.operating_system = download_aggregates.operating_system
AND sessions_table.browser = download_aggregates.browser
@ -122,5 +121,4 @@ FROM
site_data
LEFT JOIN
`moz-fx-data-shared-prod.static.third_party_standardized_country_names` AS standardized_country_list
ON
site_data.country = standardized_country_list.raw_country
ON site_data.country = standardized_country_list.raw_country

Просмотреть файл

@ -56,5 +56,4 @@ FROM
site_data AS s
LEFT JOIN
`moz-fx-data-shared-prod.static.third_party_standardized_country_names` AS std_cntry_nms
ON
s.country = std_cntry_nms.raw_country
ON s.country = std_cntry_nms.raw_country

Просмотреть файл

@ -49,8 +49,7 @@ FROM
`moz-fx-data-marketing-prod.iprospect.adspend_raw_v1` today
LEFT JOIN
`moz-fx-data-marketing-prod.iprospect.adspend_raw_v1` yesterday
USING
(`date`, fetch_ad_name)
USING (`date`, fetch_ad_name)
WHERE
today.submission_date = @submission_date
AND yesterday.submission_date = DATE_SUB(@submission_date, INTERVAL 1 DAY)

Просмотреть файл

@ -32,12 +32,10 @@ new_data AS (
`moz-fx-data-shared-prod.accounts_db_external.fxa_accounts_v1` a
LEFT JOIN
`moz-fx-data-shared-prod.accounts_db_external.fxa_totp_v1` t
USING
(uid)
USING (uid)
LEFT JOIN
`moz-fx-data-shared-prod.accounts_db_external.fxa_recovery_keys_v1` r
USING
(uid)
USING (uid)
GROUP BY
submission_date,
active,

Просмотреть файл

@ -9,5 +9,4 @@ FROM
`moz-fx-data-shared-prod.activity_stream_bi.impression_stats_by_experiment_v1` AS stats
LEFT JOIN
`moz-fx-data-shared-prod.pocket.spoc_tile_ids` AS spoc_tile_ids
USING
(tile_id)
USING (tile_id)

Просмотреть файл

@ -9,5 +9,4 @@ FROM
`moz-fx-data-shared-prod.activity_stream_bi.impression_stats_flat_v1` AS stats
LEFT JOIN
`moz-fx-data-shared-prod.pocket.spoc_tile_ids` AS spoc_tile_ids
USING
(tile_id)
USING (tile_id)

Просмотреть файл

@ -83,8 +83,7 @@ FROM
newtab_visits n_s
INNER JOIN
activity_stream a_s
USING
(submission_date, country)
USING (submission_date, country)
ORDER BY
country,
submission_date

Просмотреть файл

@ -17,7 +17,6 @@ FROM
-- approved for dev here.
JOIN
addon_id_lookup
USING
(hashed_addon_id)
USING (hashed_addon_id)
WHERE
submission_date = @submission_date

Просмотреть файл

@ -196,25 +196,19 @@ FROM
total_dau
LEFT JOIN
per_addon_version
USING
(submission_date, addon_id)
USING (submission_date, addon_id)
LEFT JOIN
per_app_version
USING
(submission_date, addon_id)
USING (submission_date, addon_id)
LEFT JOIN
per_fenix_build
USING
(submission_date, addon_id)
USING (submission_date, addon_id)
LEFT JOIN
per_locale
USING
(submission_date, addon_id)
USING (submission_date, addon_id)
LEFT JOIN
per_country
USING
(submission_date, addon_id)
USING (submission_date, addon_id)
LEFT JOIN
per_app_os
USING
(submission_date, addon_id)
USING (submission_date, addon_id)

Просмотреть файл

@ -135,17 +135,13 @@ FROM
total_downloads
LEFT JOIN
per_source
USING
(submission_date, hashed_addon_id)
USING (submission_date, hashed_addon_id)
LEFT JOIN
per_content
USING
(submission_date, hashed_addon_id)
USING (submission_date, hashed_addon_id)
LEFT JOIN
per_medium
USING
(submission_date, hashed_addon_id)
USING (submission_date, hashed_addon_id)
LEFT JOIN
per_campaign
USING
(submission_date, hashed_addon_id)
USING (submission_date, hashed_addon_id)

Просмотреть файл

@ -106,8 +106,7 @@ per_client AS (
per_clients_without_addons
INNER JOIN
per_clients_just_addons
USING
(submission_date, client_id, sample_id)
USING (submission_date, client_id, sample_id)
)
SELECT
* EXCEPT (addons),

Просмотреть файл

@ -96,8 +96,7 @@ client_share AS (
client_counts
LEFT JOIN
grand_total
USING
(submission_date, device)
USING (submission_date, device)
WHERE
device IS NOT NULL
),
@ -307,8 +306,7 @@ daily_mobile_clients AS (
)
)
)
USING
(client_id)
USING (client_id)
WHERE
submission_date >= "2022-05-10"
-- then mobile tiles went to default
@ -492,20 +490,16 @@ FROM
population
LEFT JOIN
tiles_percentages pe
USING
(product, submission_date, country, device)
USING (product, submission_date, country, device)
LEFT JOIN
suggest_percentages
USING
(product, submission_date, country, device)
USING (product, submission_date, country, device)
LEFT JOIN
clicks c
USING
(product, submission_date, country, device)
USING (product, submission_date, country, device)
LEFT JOIN
client_share
USING
(device, country, submission_date)
USING (device, country, submission_date)
WHERE
submission_date = @submission_date
ORDER BY

Просмотреть файл

@ -37,8 +37,7 @@ partition_info AS (
OR (table_name = 'event_aggregates_spons_tiles_v1' AND total_rows > 0)
OR (table_name = 'event_aggregates_suggest_v1' AND total_rows > 0)
) AS p
ON
date = PARSE_DATE('%Y%m%d', p.partition_id)
ON date = PARSE_DATE('%Y%m%d', p.partition_id)
AND dates.table_name = p.table_name
WHERE
p.total_rows IS NULL

Просмотреть файл

@ -90,6 +90,5 @@ FROM
quicksuggest qs
LEFT JOIN
ping_data pings
ON
qs.context_id = pings.context_id
ON qs.context_id = pings.context_id
AND qs.interaction_type = pings.interaction_type

Просмотреть файл

@ -153,20 +153,16 @@ FROM
desktop_population
LEFT JOIN
client_shares
USING
(country, submission_date)
USING (country, submission_date)
LEFT JOIN
suggest_clients
USING
(submission_date, country)
USING (submission_date, country)
LEFT JOIN
urlbar_clients
USING
(submission_date, country)
USING (submission_date, country)
LEFT JOIN
grand_total
USING
(submission_date)
USING (submission_date)
WHERE
submission_date = @submission_date
ORDER BY

Просмотреть файл

@ -37,8 +37,7 @@ host_join AS (
crux_country_summary c
LEFT JOIN
daily_tranco
USING
(host)
USING (host)
),
domain_join AS (
SELECT
@ -53,8 +52,7 @@ domain_join AS (
(SELECT * FROM host_join WHERE host_rank IS NULL) h
LEFT JOIN
daily_tranco t
USING
(domain)
USING (domain)
),
combined AS (
SELECT

Просмотреть файл

@ -37,9 +37,7 @@ FROM
`moz-fx-data-shared-prod`.fenix_derived.attributable_clients_v2
JOIN
`moz-fx-data-shared-prod`.fenix.firefox_android_clients
USING
(client_id)
USING (client_id)
JOIN
unfiltered_activations
USING
(client_id)
USING (client_id)

Просмотреть файл

@ -26,5 +26,4 @@ FROM
`moz-fx-data-shared-prod.fenix_derived.funnel_retention_clients_week_2_v1` AS retention_week_2
FULL OUTER JOIN
`moz-fx-data-shared-prod.fenix_derived.funnel_retention_clients_week_4_v1` AS retention_week_4
USING
(first_seen_date, client_id, sample_id)
USING (first_seen_date, client_id, sample_id)

Просмотреть файл

@ -123,18 +123,14 @@ CLUSTER BY
adjust_client
JOIN
client_day
USING
(client_id)
USING (client_id)
FULL OUTER JOIN
searches AS metrics_searches
USING
(client_id, submission_date)
USING (client_id, submission_date)
JOIN
first_seen
USING
(client_id)
USING (client_id)
LEFT JOIN
activations
USING
(client_id, submission_date)
USING (client_id, submission_date)
)

Просмотреть файл

@ -113,17 +113,13 @@ FROM
adjust_client
JOIN
client_day
USING
(client_id)
USING (client_id)
FULL OUTER JOIN
searches AS metrics_searches
USING
(client_id, submission_date)
USING (client_id, submission_date)
JOIN
first_seen
USING
(client_id)
USING (client_id)
LEFT JOIN
activations
USING
(client_id, submission_date)
USING (client_id, submission_date)

Просмотреть файл

@ -104,9 +104,7 @@ FROM
client_days
FULL OUTER JOIN
searches AS metrics_searches
USING
(client_id, sample_id, submission_date)
USING (client_id, sample_id, submission_date)
FULL OUTER JOIN
new_activations
USING
(client_id, sample_id, submission_date)
USING (client_id, sample_id, submission_date)

Просмотреть файл

@ -25,5 +25,4 @@ FROM
existing_data
FULL OUTER JOIN
new_data
USING
(sample_id, client_id)
USING (sample_id, client_id)

Просмотреть файл

@ -50,7 +50,6 @@ FROM
_current
FULL OUTER JOIN
_previous
USING
-- Include sample_id to match the clustering of the tables, which may improve
-- join performance.
(sample_id, client_id)
USING (sample_id, client_id)

Просмотреть файл

@ -80,8 +80,7 @@ event_property_indices AS (
UNNEST(extra) AS event_property
LEFT JOIN
UNNEST(CAST(['time_ms'] AS ARRAY<STRING>)) skipped_property
ON
skipped_property = event_property.key
ON skipped_property = event_property.key
WHERE
skipped_property IS NULL
GROUP BY
@ -133,8 +132,7 @@ per_event_property AS (
event_property_value_indices
INNER JOIN
event_property_indices
USING
(category, event, event_property)
USING (category, event, event_property)
WHERE
event_property_value_index <= 1000
GROUP BY
@ -163,8 +161,7 @@ per_event AS (
primary_event_types
LEFT JOIN
per_event_property
USING
(category, event)
USING (category, event)
GROUP BY
category,
event,

Просмотреть файл

@ -65,8 +65,7 @@ new_primary_event_types AS (
current_events
LEFT JOIN
event_types
USING
(category, event)
USING (category, event)
WHERE
event_types.event IS NULL
GROUP BY
@ -114,16 +113,13 @@ new_event_property_indices AS (
UNNEST(extra) AS event_property
LEFT JOIN
(SELECT * FROM event_types, UNNEST(event_properties)) event_types
USING
(category, event, key)
USING (category, event, key)
JOIN
all_primary_event_types
USING
(event, category)
USING (event, category)
LEFT JOIN
UNNEST(CAST(['time_ms'] AS ARRAY<STRING>)) skipped_property
ON
skipped_property = event_property.key
ON skipped_property = event_property.key
WHERE
skipped_property IS NULL
AND event_types.event IS NULL
@ -186,15 +182,13 @@ new_event_property_value_indices AS (
UNNEST(event_properties) AS existing_event_property,
UNNEST(value) AS `values`
) AS existing_event_type_values
ON
current_events.category = existing_event_type_values.category
ON current_events.category = existing_event_type_values.category
AND current_events.event = existing_event_type_values.event
AND event_property.key = existing_event_type_values.existing_event_property.key
AND event_property.value = existing_event_type_values.`values`.key
JOIN
all_event_property_indices
ON
all_event_property_indices.category = current_events.category
ON all_event_property_indices.category = current_events.category
AND all_event_property_indices.event = current_events.event
AND all_event_property_indices.event_property = event_property.key
WHERE
@ -244,8 +238,7 @@ per_event_property AS (
all_event_property_value_indices
INNER JOIN
all_event_property_indices
USING
(category, event, event_property)
USING (category, event, event_property)
GROUP BY
category,
event,
@ -272,8 +265,7 @@ per_event AS (
all_primary_event_types
LEFT JOIN
per_event_property
USING
(category, event)
USING (category, event)
GROUP BY
category,
event,

Просмотреть файл

@ -119,8 +119,7 @@ joined AS (
events
INNER JOIN
fenix.event_types event_types
USING
(category, event)
USING (category, event)
)
SELECT
submission_date,

Просмотреть файл

@ -944,5 +944,4 @@ FROM
_events_ping_distinct_client_count
LEFT JOIN
product_features_agg
USING
(submission_date)
USING (submission_date)

Просмотреть файл

@ -453,5 +453,4 @@ FROM
_metrics_ping_distinct_client_count
LEFT JOIN
product_features_agg
USING
(submission_date)
USING (submission_date)

Просмотреть файл

@ -114,8 +114,7 @@ first_session_ping AS (
fenix.first_session AS fenix_first_session
LEFT JOIN
first_session_ping_min_seq
ON
(
ON (
client_info.client_id = first_session_ping_min_seq.client_id
AND ping_info.seq = first_session_ping_min_seq.seq
AND fenix_first_session.sample_id = first_session_ping_min_seq.sample_id
@ -329,19 +328,15 @@ FROM
first_seen
FULL OUTER JOIN
first_session_ping first_session
USING
(client_id)
USING (client_id)
FULL OUTER JOIN
metrics_ping AS metrics
USING
(client_id)
USING (client_id)
FULL OUTER JOIN
baseline_ping AS baseline
USING
(client_id)
USING (client_id)
LEFT JOIN
activations
USING
(client_id)
USING (client_id)
WHERE
client_id IS NOT NULL

Просмотреть файл

@ -115,8 +115,7 @@ first_session_ping AS (
fenix.first_session AS fenix_first_session
LEFT JOIN
first_session_ping_min_seq
ON
(
ON (
client_info.client_id = first_session_ping_min_seq.client_id
AND ping_info.seq = first_session_ping_min_seq.seq
AND fenix_first_session.sample_id = first_session_ping_min_seq.sample_id
@ -310,20 +309,16 @@ _current AS (
first_seen
FULL OUTER JOIN
first_session_ping first_session
USING
(client_id)
USING (client_id)
FULL OUTER JOIN
metrics_ping AS metrics
USING
(client_id)
USING (client_id)
FULL OUTER JOIN
baseline_ping AS baseline
USING
(client_id)
USING (client_id)
FULL OUTER JOIN
activations
USING
(client_id)
USING (client_id)
WHERE
client_id IS NOT NULL
),
@ -458,5 +453,4 @@ FROM
_current
FULL OUTER JOIN
_previous
USING
(client_id)
USING (client_id)

Просмотреть файл

@ -37,8 +37,7 @@ retention_calculation AS (
clients_retention
INNER JOIN
clients_first_seen
USING
(client_id, sample_id)
USING (client_id, sample_id)
)
SELECT
@submission_date AS submission_date,

Просмотреть файл

@ -38,8 +38,7 @@ retention_calculation AS (
clients_retention
INNER JOIN
clients_first_seen
USING
(client_id, sample_id)
USING (client_id, sample_id)
)
SELECT
@submission_date AS submission_date,

Просмотреть файл

@ -15,8 +15,7 @@ WITH campaigns_with_persisted_ids AS (
`moz-fx-data-bq-fivetran`.google_ads.campaign_conversions_by_date
JOIN
`moz-fx-data-shared-prod`.google_ads_derived.campaign_names_map_v1
USING
(campaign_id)
USING (campaign_id)
GROUP BY
date,
campaign_name,
@ -105,12 +104,10 @@ FROM
stats
JOIN
campaigns_with_persisted_ids
USING
(date, id)
USING (date, id)
JOIN
install_dou_metrics
ON
(stats.date = install_dou_metrics.date)
ON (stats.date = install_dou_metrics.date)
AND (
campaigns_with_persisted_ids.fenix_compatible_campaign_name = install_dou_metrics.fenix_marketing_metrics_adjust_campaign
)

Просмотреть файл

@ -50,12 +50,10 @@ FROM
clients_yearly
JOIN
fenix.firefox_android_clients
USING
(sample_id, client_id)
USING (sample_id, client_id)
LEFT JOIN
fenix.client_adclicks_history
USING
(sample_id, client_id)
USING (sample_id, client_id)
WHERE
-- BrowserStack clients are bots, we don't want to accidentally report on them
first_reported_isp != "BrowserStack"

Просмотреть файл

@ -32,8 +32,7 @@ client_search AS (
`moz-fx-data-shared-prod.search_derived.mobile_search_clients_daily_v1`
JOIN
client_first_seen
USING
(client_id)
USING (client_id)
WHERE
(submission_date BETWEEN DATE_SUB(@submission_date, INTERVAL 3 DAY) AND @submission_date)
AND normalized_app_name = 'Fenix'
@ -99,13 +98,10 @@ FROM
dou
INNER JOIN
client_first_seen
USING
(client_id)
USING (client_id)
LEFT JOIN
client_search
USING
(client_id)
USING (client_id)
LEFT JOIN
adjust_client
USING
(client_id)
USING (client_id)

Просмотреть файл

@ -29,5 +29,4 @@ FROM
app_data
LEFT JOIN
mozdata.static.country_codes_v1 AS country_details
USING
(code)
USING (code)

Просмотреть файл

@ -8,8 +8,7 @@ FROM
`moz-fx-data-shared-prod.firefox_accounts_derived.fxa_users_services_daily_v1` AS fxa
LEFT JOIN
`moz-fx-data-shared-prod.static.country_names_v1` AS cn
ON
cn.name = fxa.country
ON cn.name = fxa.country
-- Once we move over to using v2 the below code should enable us
-- to remain compatible with any downstream dependencies
-- until downstream processes are updated

Просмотреть файл

@ -8,5 +8,4 @@ FROM
`moz-fx-data-shared-prod.firefox_accounts_derived.fxa_users_services_devices_daily_v1` AS fxa
LEFT JOIN
`moz-fx-data-shared-prod.static.country_names_v1` AS cn
ON
cn.name = fxa.country
ON cn.name = fxa.country

Просмотреть файл

@ -9,5 +9,4 @@ FROM
`moz-fx-data-shared-prod.firefox_accounts_derived.fxa_users_services_devices_last_seen_v1` AS fxa
LEFT JOIN
`moz-fx-data-shared-prod.static.country_names_v1` AS cn
ON
cn.name = fxa.country
ON cn.name = fxa.country

Просмотреть файл

@ -52,8 +52,7 @@ event_property_indices AS (
UNNEST(extra) AS event_property
LEFT JOIN
UNNEST(CAST([] AS ARRAY<STRING>)) skipped_property
ON
skipped_property = event_property.key
ON skipped_property = event_property.key
WHERE
skipped_property IS NULL
GROUP BY
@ -105,8 +104,7 @@ per_event_property AS (
event_property_value_indices
INNER JOIN
event_property_indices
USING
(category, event, event_property)
USING (category, event, event_property)
WHERE
event_property_value_index <= 1000
GROUP BY
@ -135,8 +133,7 @@ per_event AS (
primary_event_types
LEFT JOIN
per_event_property
USING
(category, event)
USING (category, event)
GROUP BY
category,
event,

Просмотреть файл

@ -37,8 +37,7 @@ new_primary_event_types AS (
current_events
LEFT JOIN
event_types
USING
(category, event)
USING (category, event)
WHERE
event_types.event IS NULL
GROUP BY
@ -86,16 +85,13 @@ new_event_property_indices AS (
UNNEST(extra) AS event_property
LEFT JOIN
(SELECT * FROM event_types, UNNEST(event_properties)) event_types
USING
(category, event, key)
USING (category, event, key)
JOIN
all_primary_event_types
USING
(event, category)
USING (event, category)
LEFT JOIN
UNNEST(CAST([] AS ARRAY<STRING>)) skipped_property
ON
skipped_property = event_property.key
ON skipped_property = event_property.key
WHERE
skipped_property IS NULL
AND event_types.event IS NULL
@ -158,15 +154,13 @@ new_event_property_value_indices AS (
UNNEST(event_properties) AS existing_event_property,
UNNEST(value) AS `values`
) AS existing_event_type_values
ON
current_events.category = existing_event_type_values.category
ON current_events.category = existing_event_type_values.category
AND current_events.event = existing_event_type_values.event
AND event_property.key = existing_event_type_values.existing_event_property.key
AND event_property.value = existing_event_type_values.`values`.key
JOIN
all_event_property_indices
ON
all_event_property_indices.category = current_events.category
ON all_event_property_indices.category = current_events.category
AND all_event_property_indices.event = current_events.event
AND all_event_property_indices.event_property = event_property.key
WHERE
@ -216,8 +210,7 @@ per_event_property AS (
all_event_property_value_indices
INNER JOIN
all_event_property_indices
USING
(category, event, event_property)
USING (category, event, event_property)
GROUP BY
category,
event,
@ -244,8 +237,7 @@ per_event AS (
all_primary_event_types
LEFT JOIN
per_event_property
USING
(category, event)
USING (category, event)
GROUP BY
category,
event,

Просмотреть файл

@ -25,8 +25,7 @@ joined AS (
events
INNER JOIN
firefox_accounts.event_types event_types
USING
(category, event)
USING (category, event)
)
SELECT
submission_date,

Просмотреть файл

@ -136,5 +136,4 @@ FROM
grouped_by_user _current
FULL OUTER JOIN
_previous
USING
(user_id)
USING (user_id)

Просмотреть файл

@ -40,5 +40,4 @@ FROM
_previous
FULL OUTER JOIN
_current
USING
(user_id)
USING (user_id)

Просмотреть файл

@ -30,7 +30,6 @@ FROM
_current
FULL OUTER JOIN
_previous
USING
(user_id)
USING (user_id)
WHERE
_previous.user_id IS NULL

Просмотреть файл

@ -65,5 +65,4 @@ FROM
_current
FULL JOIN
_previous
USING
(user_id)
USING (user_id)

Просмотреть файл

@ -53,5 +53,4 @@ FROM
_current
FULL JOIN
_previous
USING
(user_id)
USING (user_id)

Просмотреть файл

@ -89,8 +89,7 @@ user_service_flow_entrypoints AS (
fxa_events
JOIN
flow_entrypoints
USING
(flow_id)
USING (flow_id)
GROUP BY
user_id,
service
@ -129,8 +128,7 @@ user_service_utms AS (
fxa_events
JOIN
flow_utms
USING
(flow_id)
USING (flow_id)
GROUP BY
user_id,
service
@ -196,12 +194,10 @@ FROM
windowed
LEFT JOIN
user_service_flow_entrypoints
USING
(user_id, service)
USING (user_id, service)
LEFT JOIN
user_service_utms
USING
(user_id, service)
USING (user_id, service)
WHERE
user_id IS NOT NULL
AND service IS NOT NULL

Просмотреть файл

@ -123,12 +123,10 @@ FROM
device_service_users_entries
LEFT JOIN
entrypoints
USING
(flow_id)
USING (flow_id)
LEFT JOIN
utms
USING
(flow_id)
USING (flow_id)
WHERE
-- making sure the user is registered
user_id IS NOT NULL

Просмотреть файл

@ -53,8 +53,7 @@ combined AS (
_current
FULL JOIN
_previous
USING
(user_id, service, device_id)
USING (user_id, service, device_id)
)
SELECT
-- Retaining `timestamp` to represent when the last event took place

Просмотреть файл

@ -122,8 +122,7 @@ flows AS (
first_services_g s
INNER JOIN
fxa_content_auth_oauth AS f
ON
s.first_service_flow = f.flow_id
ON s.first_service_flow = f.flow_id
WHERE
f.entrypoint IS NOT NULL
AND s.first_service_flow IS NOT NULL
@ -145,7 +144,6 @@ FROM
first_services_g s
LEFT JOIN
flows f
USING
(first_service_flow)
USING (first_service_flow)
WHERE
first_service_flow IS NOT NULL

Просмотреть файл

@ -114,8 +114,7 @@ flows AS (
first_services_g s
INNER JOIN
fxa_content_auth_oauth AS f
ON
s.first_service_flow = f.flow_id
ON s.first_service_flow = f.flow_id
WHERE
f.entrypoint IS NOT NULL
AND s.first_service_flow IS NOT NULL
@ -137,7 +136,6 @@ FROM
first_services_g s
LEFT JOIN
flows f
USING
(first_service_flow)
USING (first_service_flow)
WHERE
first_service_flow IS NOT NULL

Просмотреть файл

@ -50,8 +50,7 @@ FROM
fxa_users_services_daily_new_entries AS new_entries
FULL OUTER JOIN
existing_entries
USING
(user_id, service)
USING (user_id, service)
WHERE
existing_entries.user_id IS NULL
AND existing_entries.service IS NULL

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше