- Published on
Leetcode - 614. Second Degree Follower
- Authors
- Name
- Indo Yoon
Table of Contents
문제
[Loading...
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
LeetCode
](https://leetcode.com/problems/second-degree-follower/)
정답
SELECT DISTINCT Follow.follower, FC.num
FROM Follow
JOIN (
SELECT followee, count(*) AS num
FROM Follow
GROUP BY followee) AS FC
ON Follow.follower = FC.followee
ORDER BY Follow.follower