The Telemetry queries doesn't update themselves if the version number doesn't change.
Closed this issue · 2 comments
Natim commented
Now that the submission_date_s3
is used to select the last chunk of available data, we have outdated queries. Especially for ESR, RELEASE or BETA channels were version number changes less than once a day.
We should probably update the query at least once a day.
Natim commented
SELECT date_format(current_date - interval '1' day, '%Y%m%d') as yesterday
Natim commented
WITH updated_t AS (
SELECT COUNT(DISTINCT client_id) * 100 AS updated
FROM main_summary
WHERE submission_date_s3 >= date_format(current_date - interval '1' day, '%Y%m%d')
AND app_build_id IN ('20171206101620')
AND normalized_channel = 'esr'
AND sample_id = '42'
),
total_t AS (
SELECT COUNT(DISTINCT client_id) * 100 AS total
FROM main_summary
WHERE submission_date_s3 >= date_format(current_date - interval '1' day, '%Y%m%d')
AND normalized_channel = 'esr'
AND sample_id = '42'
)
SELECT updated * 1.0 / total as ratio, updated, total
FROM updated_t, total_t