Page MenuHomePhabricator
Paste P8156

Referer source ratio
ActivePublic

Authored by dr0ptp4kt on Mar 5 2019, 10:59 AM.
from (
select
year,
month,
day,
referer_class,
sum(view_count) over (partition by year, month, day, referer_class)
/
sum(view_count) over (partition by year, month, day) as ratio
from
projectview_hourly
where year > 2016
and project = 'id.wikipedia'
and access_method = 'mobile web'
and agent_type = 'user') t1
select distinct *
order by referer_class, year, month, day
limit 20000
;