Page MenuHomePhabricator
Paste P11190

(An Untitled Masterwork)
ActivePublic

Authored by nshahquinn-wmf on May 13 2020, 4:51 PM.
Tags
None
Referenced Files
F31816010: raw.txt
May 13 2020, 4:51 PM
Subscribers
None
switches_r = hive.run("""
select
date,
editor,
sum(cast(switches >= 1 as int)) / count(*) as sessions_with_switches
from (
select
date_format(dt, "yyyy-MM-dd") as date,
event.editing_session_id as editingsessionid,
concat(event.platform, " ", event.editor_interface) as editor
from event.editattemptstep
where
event.action = "ready" and
year = 2019 and (
(month = 6 and day > 23) or
(month = 7)
)
) readies
left join (
select
event.editingsessionid as editingsessionid,
count(*) as switches
from event.visualeditorfeatureuse
where
event.feature = "editor-switch" and
year = 2019 and (
(month = 6 and day > 23) or
(month = 7)
)
group by event.editingsessionid
) switches
on readies.editingsessionid = switches.editingsessionid
group by date, editor
""")