Anything wrong with the code?


  • 0
    C

    select distinct a.followee as follower, count(distinct a.follower) as num
    from follow a
    inner join follow b
    on a.followee = b.follower
    group by a.followee
    order by a.followee


  • 0
    Y

    @changsidi said in Anything wrong with the code?:

    select distinct a.followee as follower, count(distinct a.follower) as num
    from follow a
    inner join follow b
    on a.followee = b.follower
    group by a.followee
    order by a.followee

    select distinct b.follower as follower, count(distinct a.follower) as num
    from follow a
    inner join follow b
    on a.followee = b.follower
    group by a.followee


Log in to reply
 

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