Table:
0
A
B
C
D
E
1
!Race name
Grade
Racecourse
Distance
Priority-entry-rights to Derby
2
1
Satsuki Shō
GI
Nakayama
Turf 2000m
3
2
Aoba Shō
GII
Tokyo
Turf 2400m
4
3
Principal Stakes
Open
Tokyo
Turf 2000m
5
4
Kyoto Shimbun Hai
GII
Kyoto
Turf 2200m
6
5
NHK Mile Cup
GI
Tokyo
Turf 1600m

Questions and formulas:
Question: What is the Grade that has Turf 1600m?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,E1="turf 1600m"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E6,E2:E6="turf 1600m"),2))
Level: medium
Question: What is the Priority-entry-rights to Derby in rank 4?
Formula: LET(query1,SUMMARIZE(E1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,2)=4))
Formula2: LET(query1,SUMMARIZE(E2:E6,SUMX(A2:A6)),FILTER(query1,CHOOSECOLS(query1,2)=4))
Level: hard