Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P45727
unique_devices_by_region_query
Active
Public
Actions
Authored by
Mayakp.wiki
on Mar 10 2023, 12:53 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
Product-Analytics
Referenced Files
F36904371: unique_devices_by_region_query
Mar 10 2023, 12:53 AM
2023-03-10 00:53:06 (UTC+0)
Subscribers
None
SELECT
DATE_FORMAT(month, 'YYYY-MM') AS month,
region,
SUM(unique_devices) AS unique_devices
FROM
(
SELECT
CONCAT(year,'-',LPAD(month,2,'0'),'-01') AS month,
cr.wmf_region AS region,
uniques_estimate as unique_devices
FROM
wmf.unique_devices_per_project_family_monthly ud
LEFT JOIN gdi.country_meta_data cr
ON ud.country_code=cr.country_code_iso_2
WHERE
year >= 2018
AND project_family = 'wikipedia'
) a
GROUP BY DATE_FORMAT(month, 'YYYY-MM') , region
LIMIT 1000
Event Timeline
Mayakp.wiki
created this paste.
Mar 10 2023, 12:53 AM
2023-03-10 00:53:06 (UTC+0)
Mayakp.wiki
mentioned this in
T331359: Reader data for regional views
.
Mar 10 2023, 12:55 AM
2023-03-10 00:55:14 (UTC+0)
Log In to Comment