Table:
0
A
B
C
D
1
last name
first name
class room
teachers
2
Wang
Lifang
110
3
Zhang
zhaoqiang
109

Questions and formulas:
Question: Find the first names of all the teachers that teach in classroom 110.
Formula: LET(a,HSTACK(B1,D1),b,D1,c,CHOOSECOLS(UNIQUE(CHOOSECOLS(FILTER(A1:D1,C1=110),4)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(B2:B3,D2:D3),b,D2:D3,c,CHOOSECOLS(UNIQUE(CHOOSECOLS(FILTER(A2:D3,C2:C3=110),4)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: Which teachers teach in classroom 110? Give me their first names.
Formula: LET(query1,FILTER(A1:D1,C1=110),UNIQUE(CHOOSECOLS(query1,4,2)))
Formula2: LET(query1,FILTER(A2:D3,C2:C3=110),UNIQUE(CHOOSECOLS(query1,4,2)))
Level: hard
Question: Find the last names of teachers teaching in classroom 109.
Formula: LET(query1,FILTER(A1:D1,C1=109),UNIQUE(CHOOSECOLS(query1,1,4)))
Formula2: LET(query1,FILTER(A2:D3,C2:C3=109),UNIQUE(CHOOSECOLS(query1,1,4)))
Level: hard
Question: Which teachers teach in classroom 109? Give me their last names.
Formula: LET(query1,FILTER(A1:D1,C1=109),UNIQUE(CHOOSECOLS(query1,4,1)))
Formula2: LET(query1,FILTER(A2:D3,C2:C3=109),UNIQUE(CHOOSECOLS(query1,4,1)))
Level: hard
Question: Report the first name and last name of all the teachers.
Formula: UNIQUE(HSTACK(B1,A1,D1))
Formula2: UNIQUE(HSTACK(B2:B3,A2:A3,D2:D3))
Level: easy
Question: What are the first name and last name of all the teachers?
Formula: UNIQUE(HSTACK(B1,A1,D1))
Formula2: UNIQUE(HSTACK(B2:B3,A2:A3,D2:D3))
Level: easy
Question: First names of teachers teaching in 110?
Formula: LET(query1,FILTER(A1:D1,C1=110),UNIQUE(CHOOSECOLS(query1,2,4)))
Formula2: LET(query1,FILTER(A2:D3,C2:C3=110),UNIQUE(CHOOSECOLS(query1,2,4)))
Level: hard
Question: The first names of teachers who teach in class room 110.
Formula: LET(a,HSTACK(B1,D1),b,D1,c,CHOOSECOLS(UNIQUE(CHOOSECOLS(FILTER(A1:D1,C1=110),4)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(B2:B3,D2:D3),b,D2:D3,c,CHOOSECOLS(UNIQUE(CHOOSECOLS(FILTER(A2:D3,C2:C3=110),4)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: The last names of teachers who teach in class room 109.
Formula: LET(a,HSTACK(A1,D1),b,D1,c,CHOOSECOLS(UNIQUE(CHOOSECOLS(FILTER(A1:D1,C1=109),4)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(A2:A3,D2:D3),b,D2:D3,c,CHOOSECOLS(UNIQUE(CHOOSECOLS(FILTER(A2:D3,C2:C3=109),4)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: What are the last names of all teachers in class room 109?
Formula: LET(query1,FILTER(A1:D1,C1=109),UNIQUE(CHOOSECOLS(query1,4,1)))
Formula2: LET(query1,FILTER(A2:D3,C2:C3=109),UNIQUE(CHOOSECOLS(query1,4,1)))
Level: hard
Question: The first names and last names of all teachers.
Formula: UNIQUE(HSTACK(B1,A1,D1))
Formula2: UNIQUE(HSTACK(B2:B3,A2:A3,D2:D3))
Level: easy
Question: What are the teachers' first and last names?
Formula: UNIQUE(HSTACK(B1,A1,D1))
Formula2: UNIQUE(HSTACK(B2:B3,A2:A3,D2:D3))
Level: easy
Question: What are the first names of teachers in 110?
Formula: LET(query1,FILTER(A1:D1,C1=110),UNIQUE(CHOOSECOLS(query1,2,4)))
Formula2: LET(query1,FILTER(A2:D3,C2:C3=110),UNIQUE(CHOOSECOLS(query1,2,4)))
Level: hard
Question: The last names of teachers in class room 109.
Formula: LET(query1,FILTER(A1:D1,C1=109),UNIQUE(CHOOSECOLS(query1,1,4)))
Formula2: LET(query1,FILTER(A2:D3,C2:C3=109),UNIQUE(CHOOSECOLS(query1,1,4)))
Level: hard