12
返回列表 发新帖
楼主: susiezam
跳转到指定楼层
上一主题 下一主题
收起左侧

脸家DS店面

🔗
chipmunkL 2018-8-25 00:15:15 | 只看该作者
全局:
SELECT ROUND(IFNULL(
(SELECT COUNT(*)-baidu 1point3acres
FROM (SELECT DISTINCT actor_uid, target_uid
FROM Friending
WHERE action = “accept_request”.
AND date = “2018-01-01”) t1) /
(SELECT COUNT(*)
FROM (SELECT DISTINCT actor_uid, target_uid
FROM Friending
WHERE action = “send_request”
AND date = “2018-01-01”) t2)
, 0), 2) AS acceptance_rate;
回复

使用道具 举报

🔗
daisy3104 2018-8-25 01:54:39 | 只看该作者
全局:
謝謝樓主分享
回复

使用道具 举报

🔗
hyper8866 2018-8-29 09:01:10 | 只看该作者
全局:
holly3crane 发表于 2018-8-23 23:08
不知道我的想法是不是对的,可能是整体的逻辑和沟通出了bug?比如应该先和面试官讨论 怎么定义‘好’,然 ...

哈哈 我觉得有道理。我的确说了首先定义好,不过自问自答自己说了个答案....总之全程自问自答。。anyway...
回复

使用道具 举报

🔗
hyper8866 2018-8-29 09:01:17 | 只看该作者
全局:
holly3crane 发表于 2018-8-23 23:08
不知道我的想法是不是对的,可能是整体的逻辑和沟通出了bug?比如应该先和面试官讨论 怎么定义‘好’,然 ...

哈哈 我觉得有道理。我的确说了首先定义好,不过自问自答自己说了个答案....总之全程自问自答。。anyway...
回复

使用道具 举报

🔗
keran 2018-9-6 02:18:35 | 只看该作者
全局:


Q1:
1. send a request on 2018-01-01, accept anytime
select ifnull(count(t2.*)/count(t1.*)) as acceptence_rate
(select distinct actor_uid, target_uid
from table where action = 'send_request' where date = '2018-01-01') as t1 left join
(select distinct actor_uid, target_uid.
from table where action  = 'accept_request') as t2 on t1.actor_uid = t2.target_uid and t1.target_uid = t2.actor_uid

2. send and accept on 2018-01-01:.google  и
send a request on 2018-01-01, accept anytime
select ifnull(count(t2.*)/count(t1.*)) as acceptence_rate
(select distinct actor_uid, target_uid
from table where action = 'send_request' where date = '2018-01-01') as t1 left join
(select distinct actor_uid, target_uid
from table where action  = 'accept_request' where date = '2018-01-01') as t2 on t1.actor_uid = t2.target_uid and t1.target_uid = t2.actor_uid.--



Q2:
1. check other metrics, such as send request rate, day active user number, engagement user number 是不是有很大差异
2. 页面有没有feature发生了改变影响这个

选metrics衡量在newsfeed里面加friend recommendation这个feature好不? 以及各种follow ups, 比如如果发现test group的CTR 25%,这是好还是不好,选什么metric衡量user engagement level

crt,crp, day/monthly active user number, engagement user number ..
可以用假设检验么 在不在confidence interval, 算出成population是不是h很大
# of user send friend request/ # of user visit newsfeed

自己随便写的 不知道对不对。。。欢迎指正
回复

使用道具 举报

全局:
mathwyc 发表于 2018-8-9 00:29
根据不同的理解写了两个版本的query,请大家指正:
With t1 as (
Select distinct actor_uid, target_uid ...
.google  и
我觉得你的第一个必须还是t1.actor_uid = t2.target_uid and t2.actor_uid = t1.target_uid
不然的话有可能acceptance rate > 100%
因为当天accpet的人可能大于当天send的人
回复

使用道具 举报

全局:

  1. -- Friends sent and accept on the same day
  2. SELECT ROUND(COUNT(a.*)/NULLIF(COUNT(b.*),0)::float*100,2) AS accptance_rate
  3. FROM
  4. (SELECT DISTINCT actor_uid, target_uid, action
  5. FROM Friending
  6. WHERE date_trunc('day',time) = '2018-08-01' AND action = 'send_request') a
    -baidu 1point3acres
  7. LEFT JOIN
  8. (SELECT DISTINCT actor_uid, target_uid, action
  9. FROM Friending
  10. WHERE date_trunc('day',time) = '2018-08-01' AND action = 'accept_request') b
  11. ON a.target_uid = b.actor_uid and a.actor_uid = b.target_uid

  12. -- Friends accept on Aug 1st but send can be any day before ..
  13. SELECT ROUND(COUNT(a.*)/NULLIF(COUNT(b.*),0)::float*100,2) AS accptance_rate ..
  14. FROM
  15. (SELECT DISTINCT actor_uid, target_uid, action
  16. FROM Friending
  17. WHERE date_trunc('day',time) <= '2018-08-01' AND action = 'send_request') a
  18. LEFT JOIN
  19. (SELECT DISTINCT actor_uid, target_uid, action
  20. FROM Friending
  21. WHERE date_trunc('day',time) = '2018-08-01' AND action = 'accept_request') b
  22. ON a.target_uid = b.actor_uid and a.actor_uid = b.target_uid
复制代码
回复

使用道具 举报

🔗
nicolehsu 2018-11-8 15:09:00 | 只看该作者
全局:
Thanks for sharing
回复

使用道具 举报

🔗
cherryyiyiyi 2018-12-17 11:20:39 | 只看该作者
全局:
求高手指点,这样写ok不?

SELCT date, sum(case when action='accept_request' then 1 else 0 end)/ sum(case when action in ('accept_request','send_request )then 1 else 0 end)
FROM A
WHERE date=2018-01-01
回复

使用道具 举报

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

本版积分规则

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