Loading problem...
Your analytics team stores social follows in a table named follow.
Columns:
Data guarantees:
Define a two-sided active account as an account that:
Task: Return every two-sided active account and how many distinct followers it has.
Output requirements:
Supported submission environments:
follow:
| followee | follower |
|----------|----------|
| Alice | Bob |
| Bob | Cena |
| Bob | Donald |
| Donald | Edward |[
{"follower":"Bob","num":2},
{"follower":"Donald","num":1}
]Bob and Donald each follow someone and each have incoming followers. Alice is followed but does not follow anyone, so Alice is excluded.
follow:
| followee | follower |
|----------|----------|
| Root | Leaf1 |
| Root | Leaf2 |
| Root | Leaf3 |
| Root | Leaf4 |[]Root has inbound followers but no outbound follow. Each Leaf has outbound follow but no inbound followers. No account is active on both sides.
follow:
| followee | follower |
|----------|----------|
| Nina | Omar |
| Omar | Pia |
| Pia | Nina |
| Nina | Quinn |
| Ravi | Nina |
| Pia | Ravi |[
{"follower":"Nina","num":2},
{"follower":"Omar","num":1},
{"follower":"Pia","num":2},
{"follower":"Ravi","num":1}
]Nina, Omar, Pia, and Ravi all have at least one incoming and one outgoing follow relation.
Constraints