Table:
0
A
B
C
D
1
teacher id
name
age
hometown
2
1
Joseph Huts
32
Blackrod Urban District
3
2
Gustaaf Deloor
29
Bolton County Borough
4
3
Vicente Carretero
26
Farnworth Municipal Borough
5
4
John Deloor
33
Horwich Urban District
6
5
Kearsley Brown
45
Kearsley Urban District
7
6
Anne Walker
41
Little Lever Urban District
8
7
Lucy Wong
39
Turton Urban District

Questions and formulas:
Question: How many teachers are there?
Formula: SUM(A1)
Formula2: SUM(A2:A8)
Level: easy
Question: What is the total count of teachers?
Formula: SUM(A1)
Formula2: SUM(A2:A8)
Level: easy
Question: List the names of teachers in ascending order of age.
Formula: SORTBY(B1,C1,1)
Formula2: SORTBY(B2:B8,C2:C8,1)
Level: easy
Question: What are the names of the teachers ordered by ascending age?
Formula: SORTBY(B1,C1,1)
Formula2: SORTBY(B2:B8,C2:C8,1)
Level: easy
Question: What are the age and hometown of teachers?
Formula: CHOOSE({1,2},C1,D1)
Formula2: CHOOSE({1,2},C2:C8,D2:D8)
Level: easy
Question: What is the age and hometown of every teacher?
Formula: CHOOSE({1,2},C1,D1)
Formula2: CHOOSE({1,2},C2:C8,D2:D8)
Level: easy
Question: List the name of teachers whose hometown is not "Little Lever Urban District".
Formula: LET(a,HSTACK(B1,A1),b,A1,c,CHOOSECOLS(UNIQUE(CHOOSECOLS(FILTER(A1:D1,D1<>"little lever urban district"),1)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(B2:B8,A2:A8),b,A2:A8,c,CHOOSECOLS(UNIQUE(CHOOSECOLS(FILTER(A2:A8:D1,D2:D8<>"little lever urban district"),1)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: What are the names of the teachers whose hometown is not "Little Lever Urban District"?
Formula: LET(a,HSTACK(B1,A1),b,A1,c,CHOOSECOLS(UNIQUE(CHOOSECOLS(FILTER(A1:D1,D1<>"little lever urban district"),1)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(B2:B8,A2:A8),b,A2:A8,c,CHOOSECOLS(UNIQUE(CHOOSECOLS(FILTER(A2:A8:D1,D2:D8<>"little lever urban district"),1)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: What is the hometown of the youngest teacher?
Formula: LET(a,SORTBY(D1,C1,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Formula2: LET(a,SORTBY(D2:D8,C2:C8,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Level: hard
Question: For each hometown, how many teachers are there?
Formula: SUMMARIZE(D1,SUMX(A1))
Formula2: SUMMARIZE(D2:D8,SUMX(A2:A8))
Level: easy
Question: Show the hometowns shared by at least two teachers.
Formula: LET(query1,SUMMARIZE(D1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Formula2: LET(query1,SUMMARIZE(D2:D8,SUMX(A2:A8)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Level: hard
Question: the number of teachers
Formula: SUM(A1)
Formula2: SUM(A2:A8)
Level: easy
Question: Number of teachers.
Formula: SUM(A1)
Formula2: SUM(A2:A8)
Level: easy
Question: the names and ids of teachers whose hometown is not Little Lever Urban District
Formula: LET(query1,FILTER(A1:D1,D1<>"little lever urban district"),UNIQUE(CHOOSECOLS(query1,2,1)))
Formula2: LET(query1,FILTER(A2:D8,D2:D8<>"little lever urban district"),UNIQUE(CHOOSECOLS(query1,2,1)))
Level: hard
Question: The names and ids of teachers who are not from Little Lever Urban District.
Formula: LET(query1,FILTER(A1:D1,D1<>"little lever urban district"),UNIQUE(CHOOSECOLS(query1,2,1)))
Formula2: LET(query1,FILTER(A2:D8,D2:D8<>"little lever urban district"),UNIQUE(CHOOSECOLS(query1,2,1)))
Level: hard
Question: Where does the youngest among the teachers come from?
Formula: LET(a,HSTACK(D1,A1),b,A1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(A1,SUMX(C1)), 2, 1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(D2:D8,A2:A8),b,A2:A8,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(A2:A8,SUMX(C2:C8)), 2, 1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: Number of teachers and their respective hometowns.
Formula: HSTACK(SUM(A1), ROWS(UNIQUE(D1)))
Formula2: HSTACK(SUM(A2:A8), ROWS(UNIQUE(D2:D8)))
Level: hard
Question: The hometown where >= 2 teachers come from.
Formula: LET(query1,SUMMARIZE(D1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Formula2: LET(query1,SUMMARIZE(D2:D8,SUMX(A2:A8)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Level: hard
Question: the count of teachers
Formula: SUM(A1)
Formula2: SUM(A2:A8)
Level: easy
Question: Where does the youngest teacher come from?
Formula: TAKE(SORT(SUMMARIZE(HSTACK(D1,A1),SUMX(C1)), 3, 1), 1)
Formula2: TAKE(SORT(SUMMARIZE(HSTACK(D2:D8,A2:A8),SUMX(C2:C8)), 3, 1), 1)
Level: hard
Question: the number of teachers and their hometowns
Formula: HSTACK(SUM(A1), ROWS(UNIQUE(D1)))
Formula2: HSTACK(SUM(A2:A8), ROWS(UNIQUE(D2:D8)))
Level: hard