Meta VO 面试真题解析:Instagram 注册当天访问 Search 的大学生占比(按国家统计)

17次阅读
没有评论

Instagram College Students Visiting Search on the Day of Registration, by Country

Table: ig_users

This table has one row for every Instagram user.

Columns:

  • user_id INT — The unique identifier of the Instagram user
  • country STRING — Country of the user
  • is_college BOOLEAN — Indicates whether a user is a college student
  • reg_date DATE — Date that the user joined Instagram

Sample Rows:

user_id | country | is_college | reg_date
1012    | US      | TRUE       | 2019-02-02
7506    | JP      | FALSE      | 2015-04-07
3098    | IN      | TRUE       | 2017-12-05
8904    | US      | TRUE       | 2020-06-19

Table: ig_time_spent

This table has data on how users spend time on Instagram, aggregated per surface.

Columns:

  • date DATE — The date that the user visited Instagram
  • user_id INT — The unique identifier of the Instagram user
  • surface STRING — Which surface the user visited
  • time_spent DOUBLE — The amount of time (in seconds) spent on that surface

Sample Rows:

date       | user_id | surface  | time_spent
2020-12-02 | 1012    | profile  | 279.856
2020-12-02 | 1012    | stories  | 433.775
2020-12-02 | 3652    | search   | 68.233
2020-12-01 | 7506    | stories  | 342.190

By country, what percentage of all college students that joined Instagram on 2023-12-01 went to Search on the same day of registration?

这道题考察的是按国家分组统计转化比例:先从 <code>ig_users</code> 中筛选出在 <code>2023-12-01</code> 注册且是大学生的用户,再与 <code>ig_time_spent</code> 按 <code>user_id</code> 和当天日期关联,找出注册当天是否访问了 <code>search</code> 页面。最后按 <code>country</code> 计算“访问过 Search 的大学生人数 / 当天注册的大学生总人数”并转成百分比即可。关键点在于先限定注册日期,再判断同一天的行为记录,通常会用条件聚合或分组统计来完成。

正文完
 0