📣 独立日限时特惠: VIP通行证立减$68
12
返回列表 发新帖
楼主: vxs45
跳转到指定楼层
上一主题 下一主题
收起左侧

LinkedIn DS intern 技术一面面经

🔗
 楼主| vxs45 2019-1-17 15:33:57 来自APP | 只看该作者
全局:
mjin 发表于 2019/01/17 15:26:58
谢谢分享!下礼拜也要一轮店面了 hr和我说是algorithm coding和sql 请问lz当时的hr有和你说可能要面algorithm嘛!!我看地里的帖子基本都没有提到面algo的诶

hr当时电话跟我也提过,但是我第一轮只有data manipulation这一类的题目呢
回复

使用道具 举报

全局:
求问楼主第二题这样写对吗

1)
select B.user_id, B.date, count(A.product_group_id) as num_product_group_viewed. Χ
from B left join A on B.page_id = A.Page_id
where B.user_id = “XXX” and B.date = “balala”
.google  и
2)
select num_product_group_viewed, count(user_id) as num_users from
(select B.user_id, B.date, count(A.product_group_id) as num_product_group_viewed. 1point 3acres
from B left join A on B.page_id = A.Page_id
group by user_id) T
group by num_product_group_viewed

以及 第一题第二问不需要用sql 吗

跪谢。。。。
回复

使用道具 举报

🔗
 楼主| vxs45 2019-2-2 22:04:57 来自APP | 只看该作者
全局:
萌女特别猛 发表于 2019/02/01 15:23:41
求问楼主第二题这样写对吗
.
1)
select B.user_id, B.date, count(A.product_group_id) as num_product_group_viewed. .и
...

1) group by user_id, where里只filter date. Χ
2) 嗯这题让我用python/r
回复

使用道具 举报

🔗
Frances0412 2019-8-23 00:36:35 | 只看该作者
全局:
vxs45 发表于 2019-2-2 22:04. .и
1) group by user_id, where里只filter date
2) 嗯这题让我用python/r

请问下第二题第一问既然已经要某个specific date,为什么还需要输出date?如果要输出的话那group by里面也应该要加入date吧。。。
应该是下面这种?但是我觉得这样很奇怪唉。。。不知道当时你怎么写的?
select B.user_id, B.date, count(A.product_group_id) as num_product_group_viewed . 1point3acres.com
from B left join A
on B.page_id = A.page_id
group by user_id, B.date
where B.date=‘blabla’
回复

使用道具 举报

🔗
Frances0412 2019-8-23 00:41:16 | 只看该作者
全局:
vxs45 发表于 2019-2-2 22:04
1) group by user_id, where里只filter date
2) 嗯这题让我用python/r

然后第二题第二问用python写的话是这样嘛

df1=pd.read_csv(‘table_A.csv’)
df2=pd.read_csv(‘table_B.csv’)

df3 = pd.merge(df2[df2[‘Date’]==‘blabla’], df1, on=‘page_id’, how=‘left’).groupby([’user_id’, ‘Date’]).size().to_frame.reset_index(name=‘num_product_group_viewed’)

df4=df3.groupby([’ num_product_group_viewed’]).['user_id'].nunique().reset_index(name='num_users')-baidu 1point3acres
(应该是count unique user吧?)
回复

使用道具 举报

🔗
qinian 2019-12-7 10:29:55 来自APP | 只看该作者
全局:
求问楼主今天收到邮件hr说要有一个20分钟电话,问一个tech问题,你的一面是指的这个吗?还是他们hr先打电话聊我自己的简历然后再面sql?
回复

使用道具 举报

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

本版积分规则

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