Table:
0
A
B
C
D
E
F
1
uid
name
email
partition id
followers
user profiles
2
1
Iron Man
ts@richest.com
1
6662425
3
2
Mary
Mary@yale.edu
2
890
4
3
Black Widow

bw@superhero.com
23
35425845
5
4
Susan
susan@gmail.com

1
100
6
5
Tyler Swift
ts@superstar.com

10
99999998
7
6
Celine Dion
cd@superstar.com
5
23927492
8
7
Natalie Portman
np@superstar.com
5
94375428

Questions and formulas:
Question: Find the emails of the user named "Mary".
Formula: FILTER(C1,B1="Mary")
Formula2: FILTER(C2:C8,B2:B8="Mary")
Level: easy
Question: What is the partition id of the user named "Iron Man".
Formula: FILTER(D1,B1="Iron Man")
Formula2: FILTER(D2:D8,B2:B8="Iron Man")
Level: easy
Question: How many users are there?
Formula: ROWS(UNIQUE(F1))
Formula2: ROWS(UNIQUE(F2:F8))
Level: easy
Question: Find the name and email of the users who have more than 1000 followers.
Formula: CHOOSE({1,2},FILTER(B1,E1>1000),FILTER(C1,E1>1000))
Formula2: CHOOSE({1,2},FILTER(B2:B8,E2:E8>1000),FILTER(C2:C8,E2:E8>1000))
Level: medium
Question: Find the name of the user who has the largest number of followers.
Formula: LET(a,SORTBY(B1,E1,-1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Formula2: LET(a,SORTBY(B2:B8,E2:E8,-1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Level: hard
Question: Find the name and email of the user followed by the least number of people.
Formula: LET(a,SORTBY(CHOOSE({1,2},B1,C1),E1,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Formula2: LET(a,SORTBY(CHOOSE({1,2},B2:B8,C2:C8),E2:E8,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Level: hard
Question: List the name and number of followers for each user, and sort the results by the number of followers in descending order.
Formula: SORTBY(CHOOSE({1,2},B1,E1),E1,-1)
Formula2: SORTBY(CHOOSE({1,2},B2:B8,E2:E8),E2:E8,-1)
Level: easy
Question: What are names and emails of users with over 1000 followers?
Formula: LET(query1,SUMMARIZE(HSTACK(B1,C1,F1),SUMX(E1)),FILTER(query1,CHOOSECOLS(query1,4)>1000))
Formula2: LET(query1,SUMMARIZE(HSTACK(B2:B8,C2:C8,F2:F8),SUMX(E2:E8)),FILTER(query1,CHOOSECOLS(query1,4)>1000))
Level: hard
Question: Name and profile for the most-followed user.
Formula: TAKE(SORT(SUMMARIZE(HSTACK(B1,F1),SUMX(E1)), 3, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(HSTACK(B2:B8,F2:F8),SUMX(E2:E8)), 3, -1), 1)
Level: hard
Question: Name, email and profile of the least-followed user.
Formula: TAKE(SORT(SUMMARIZE(HSTACK(B1,C1,F1),SUMX(E1)), 4, 1), 1)
Formula2: TAKE(SORT(SUMMARIZE(HSTACK(B2:B8,C2:C8,F2:F8),SUMX(E2:E8)), 4, 1), 1)
Level: hard
Question: Mary's email and user profile
Formula: LET(query1,FILTER(A1:F1,B1="mary"),UNIQUE(CHOOSECOLS(query1,3,6)))
Formula2: LET(query1,FILTER(A2:F8,B2:B8="mary"),UNIQUE(CHOOSECOLS(query1,3,6)))
Level: hard
Question: Partition id and user profile of Iron Man.
Formula: LET(query1,FILTER(A1:F1,B1="iron man"),UNIQUE(CHOOSECOLS(query1,4,6)))
Formula2: LET(query1,FILTER(A2:F8,B2:B8="iron man"),UNIQUE(CHOOSECOLS(query1,4,6)))
Level: hard
Question: What are the email and user profiles for mary?
Formula: LET(query1,FILTER(A1:F1,B1="mary"),UNIQUE(CHOOSECOLS(query1,3,6)))
Formula2: LET(query1,FILTER(A2:F8,B2:B8="mary"),UNIQUE(CHOOSECOLS(query1,3,6)))
Level: hard
Question: What are names, emails and profiles for users with more than 1000 followers?
Formula: LET(query1,SUMMARIZE(HSTACK(B1,C1,F1),SUMX(E1)),FILTER(query1,CHOOSECOLS(query1,4)>1000))
Formula2: LET(query1,SUMMARIZE(HSTACK(B2:B8,C2:C8,F2:F8),SUMX(E2:E8)),FILTER(query1,CHOOSECOLS(query1,4)>1000))
Level: hard