Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2352858
Bump unread with NSP Accumulation Mode
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
gilshafir
Jan 13 2017, 12:58 AM
2017-01-13 00:58:47 (UTC+0)
Size
719 B
Referenced Files
None
Subscribers
None
Bump unread with NSP Accumulation Mode
View Options
create table tmp_gil_vpv_am TBLPROPERTIES('RETENTION'='14') as
select userid,
mf_story_key,
coalesce(extra_metadata['original_query_id'], qid) as agg_qid,
accumulation_mode,
bump_reason,
min(raw_client_time) as client_time
from feed_vpvd
where ds = '<DATEID-1>'
and fb_nectar_sampling_pct(userid) > 0.99
and interface = 'android_native'
group by 1,2,3,4,5
;
create table tmp_gil_vpv_am_ranked as
select *,
rank() over (partition by userid, mf_story_key order by client_time) as rank
from tmp_gil_vpv_am
;
select accumulation_mode, count(distinct userid) * 100 as users,
count(*) * 100 as bump_unread
from tmp_gil_vpv_am_ranked
where rank > 1
and bump_reason = 1
-- and accumulation_mode = 13
group by 1
order by 1
;
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
421698
Default Alt Text
Bump unread with NSP Accumulation Mode (719 B)
Attached To
Mode
P2030 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment