回复: 4
跳转到指定楼层
上一主题 下一主题
收起左侧

菲斯不可 SQL面经题 超全总结 标准答案 (无权限,求加米)

   
全局:

2021(1-3月) 分析|数据科学类 硕士 全职@meta - 猎头 - HR筛选  | | Other | 在职跳槽

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

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

x
本人收集到的SQL 题 with 标准答案 还请大家帮忙加米!不设置任何积分权限!
FB: Popularity Percentage . From 1point 3acres bbs
Find the popularity percentage for each user on FB. the popularity percentage is defined as the total number of friends the user  has divide by the total number of users on the platform
--total number of friends the user has/total number of users on the platform
--total number of users on the platform: union user 1 and user 2
--total number of friends the user has: union user1 and user2, user2 and user1
Select user1,count(*)/max(tuu.all_users) *100  from (
Select coin(*) as all_users from (
Select distinct user1 from facebook_friends
Union
Select distinct user2 from facebook_friends) total_unique_users
)tuu. 1point 3acres
Join (
. 1point3acres.com Select user1,user2 from facebook_friends
Union
Select user2 as user1, user1 as user2 from facebook_friends) b
On 1=1
Group by user1
Order by user1 asc
FB: SMS confirmation from users
Fb sends SMS texts when users 2f to logoin at which time they must confirm they received the sms text. Confirmation texts are only valid on the date they were sent. Unfortunately, there was an ETL problem where friend requests  and invalid confirmation records were inserted into the fb_sms_sends table. fortunately , the fb_confirmers table contains valid confirmation records.
Calculate pct of confirmed SMS texts for august 4, 2020
--filter out type=confirmation and type=friend request
--filter for ds=’08-04’2020’
--left join fb confirmers with fb-sms sends on phone number
--count(phone numbers from fb_confirms)/count(phone_numers from fb_sms_sends)
Select count(b.phone_number)/count(a.phone_number)*100 as pct from fb_sms_sends a
Left join fb_confirmers b .google  и
On a.phone_number=b.phone_number and b.dat
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
21159. 市场分析 II
Table: Users


+----------------+---------+
| Column Name    | Type    |
+----------------+---------+
| user_id        | int     |
| join_date      | date    |
| favorite_brand | varchar |
+----------------+---------+
user_id is the primary key of this table.
. 1point 3 acresThis table has the info of the users of an online shopping website where users can sell and buy items.. check 1point3acres for more.
Table: Orders. Waral dи,
+---------------+---------+
| Column Name   | Type    |
+---------------+---------+
| order_id      | int     |
| order_date    | date    |
| item_id       | int     |
| buyer_id      | int     |
. Waral dи,| seller_id     | int     |-baidu 1point3acres
+---------------+---------+
order_id is the primary key of this table.. 1point 3acres
item_id is a foreign key to the Items table.. check 1point3acres for more.
buyer_id and seller_id are foreign keys to the Users table.
Table: Items
+---------------+---------+



.google  и







. From 1point 3acres bbs



评分

参与人数 36大米 +48 收起 理由
srjalan + 1 给你点个赞!
grace19990252 + 1 很有用的信息!
lemon1019 + 1 赞一个
yigedataozi + 1 赞一个
jennyapple + 1 赞一个

查看全部评分


上一篇:FB 第一面,hm面,基本都是behavior question
下一篇:巨硬hr史上最lowball

本帖被以下淘专辑推荐:

  • · FB|主题: 25, 订阅: 2
🔗
mx4rh 2021-6-7 10:33:21 | 只看该作者
全局:
这帖必须点赞评分收藏一键三联啊!
回复

使用道具 举报

全局:
请问一下LZ:“L21159. 市场分析 II”的L21159是什么意思?好像不是Leetcode里面的题号
多谢啦!
回复

使用道具 举报

🔗
w56sun 2021-8-18 23:41:49 | 只看该作者
全局:
谢谢lz lz好人!

评分

参与人数 1大米 +2 收起 理由
tgttxy + 2 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
tgttxy 2021-9-11 02:00:22 | 只看该作者
全局:
好多密码。。。感谢楼主的分享!
回复

使用道具 举报

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

本版积分规则

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