My simple Solution with self join


  • 0
    E

    '''
    select f1.follower, count(distinct f2.follower) as 'num' from follow as f1, follow as f2 where f1.follower = f2.followee group by f2.followee;
    '''


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.