Table:
0
A
B
C
D
E
1
Class
Wheels
Date
Builder
No. Built
2
K1
2-6-4T
1925
Ashford
1
3
L1
4-4-0
1926
North British
15
4
Lord Nelson
4-6-0
1926-9
Eastleigh
16
5
U
2-6-0
1928
Eastleigh
7
6
U
2-6-0
1928
Brighton
6
7
U
2-6-0
1928
Ashford
7
8
U
2-6-0
1928
Brighton
10
9
U
2-6-0
1931
Ashford
20
10
U1
2-6-0
1928
Ashford
1
11
U1
2-6-0
1931
Eastleigh
20
12
Z
0-8-0T
1929
Brighton
8
13
V "Schools"
4-4-0
1930-5
Eastleigh
40
14
W
2-6-4T
1932
Eastleigh
6
15
W
2-6-4T
1935-6
Ashford
10
16
Q
0-6-0
1938-9
Eastleigh
20

Questions and formulas:
Question: What class has 4-4-0 wheels and was less than number 40 built?
Formula: LET(query1,LET(query1,FILTER(A1:E1,B1="4-4-0"),SUMMARIZE(CHOOSECOLS(query1,1),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,2)<40))
Formula2: LET(query1,LET(query1,FILTER(A2:E16,B2:B16="4-4-0"),SUMMARIZE(CHOOSECOLS(query1,1),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,2)<40))
Level: hard