📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
回复: 7
跳转到指定楼层
上一主题 下一主题
收起左侧

Twitch Data Analyst

🔗
匿名用户-VCQVM  2020-1-12 03:22:33 |倒序浏览

2020(1-3月) 分析|数据科学类 硕士 全职@twitch - 猎头 - 技术电面  | | Fail | 在职跳槽

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
面试挂了,虽然自我感觉准备的挺充分,但还是没有把面经给吃透。求积分想看更多的帖子.--
Take away
1. 面经真的很重要,把面经看懂了,能给不懂的人说,最好自己create 一个table 做一下,面试过程当中还是会有follow up question的2. 虽然可以clarify,但对对方问题的理解的准确性的理解也很重要,我在clarify上花了挺久时间的。 还是需要多模拟一下面试。
同时招募在职小伙伴一起互相mock interview 转data scientist analytics track。能够commit 的请发邮件 bloominglife08@gmail.com
3. code clean,performance 都很重要
4. 准备的过程,觉得leet code 的题和面试的时候还是不大一样,觉得FB 的面试sql题和真题更加接近。可以刷完leetcode 写FB
.--
一个ask, 大家有看到用set variable 之类的sql 题么?
.--
Question1:

table name: ps (play sessions)

one row is one session

country | duration (s). Χ

US       600

US       300

JP      1800

US         75


### 1. Write a query that returns the average duration of sessions longer than 30 mins. Waral dи,

select avg(duration).--
. check 1point3acres for more.
from ps

where duration > 1800;


### 2. top 5 countries with highest total duration (ask rank, window function) .
.
with sessions as .google  и

(select country, sum(duration) as session

from ps)-baidu 1point3acres

select country

from (.1point3acres

select country, rank() over (order by session) as rank

from ps) tbl

where rank ≤ 5

order by rank;

### 3. write a query that return data for a histogram of play sessions in 5 mins

bin   |   sessions.1point3acres

---
. 1point 3 acres
0-5         200
.google  и
5-10        300

10-15      600   


您好!
本帖隐藏的内容需要积分高于 150 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 150 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies



### 4. Write a query that returns similar countries, where similar countries are defined as having within 1000 total sessions of each other

US 6000
. Χ
JP 5001
. 1point 3 acres
Result

country_a | country_b
.
US              JP
. check 1point3acres for more.
JP               US

面试官说能否用inner join,但同时输出US 和 JP. 我用了cross join 大家如果有别的解法,请留言哈。

The question asks if the duration difference between 1000 then consider them as similar countries



with agg as
..
(select country, count(*) as sessions

from ps

group by country)

select a.country as country_a, [b.count](http://b.country)ry as country_b

from agg a

cross join agg b. 1point 3 acres

where (a.sessions - b.sessions) <1000 and [a.country](http://a.country) <> [b.country](http://b.country).1point3acres

. .и


. Χ

评分

参与人数 6大米 +31 收起 理由
chinchilla + 1 很有用的信息!
dongyumeng88 + 1 给你点个赞!
zzzgsss + 1 很有用的信息!
Hairrr + 1 给你点个赞!
shmily221 + 2 给你点个赞!

查看全部评分


上一篇:FB DS Analytics Onsite
下一篇:JP Morgan Chase Quantitative Analyst Internship OA

本帖被以下淘专辑推荐:

推荐
yyk95 2020-5-15 13:12:20 | 只看该作者
全局:
感谢楼主分享!请问这一轮电面除了sql还有其他问题么?
回复

使用道具 举报

推荐
Hairrr 2020-2-23 02:14:59 | 只看该作者
全局:
感觉楼主第三题还是没有写对啊,bucket_fl和bucket_cl出来结果不会一样吗?

第四题其实用inner join会更简单吧,If WHERE clause is used with CROSS JOIN, it functions like an INNER JOIN.
回复

使用道具 举报

🔗
sibingqian 2020-5-14 10:58:58 | 只看该作者
全局:
谢谢楼主,学习了
回复

使用道具 举报

🔗
flavonoid 2020-6-12 08:46:02 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

🔗
xiaokeaibeth 2020-7-7 12:06:40 | 只看该作者
全局:
楼主,这是你被问到的原题嘛
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-VCQVM  2020-7-7 12:39:02
xiaokeaibeth 发表于 2020-7-7 12:06
楼主,这是你被问到的原题嘛
. check 1point3acres for more.
对的
回复

使用道具 举报

🔗
qy530389826 2020-7-8 05:38:48 | 只看该作者
全局:
谢谢楼主,学习了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表