题目链接:点击打开链接
题目大意:略。
解题思路:略。
相关企业
- 亚马逊(Amazon)
AC 代码
-- 解决方案(1) SELECT e1.employee_id, cnt team_size FROM Employee e1 JOIN (SELECT team_id, COUNT(*) cnt FROM Employee GROUP BY 1) e2 USING(team_id) -- 解决方案(2) SELECT employee_id, COUNT(employee_id) OVER(PARTITION BY team_id) AS team_size FROM Employee