Table:
0
A
B
C
D
1
airline id
name
distance
aircraft
2
1
Boeing 747-400
8430
3
2
Boeing 737-800
3383
4
3
Airbus A340-300
7120
5
4
British Aerospace Jetstream 41
1502
6
5
Embraer ERJ-145
1530
7
6
SAAB 340
2128
8
7
Piper Archer III
520
9
8
Tupolev 154
4103
10
16
Schwitzer 2-33
30
11
9
Lockheed L1011
6900
12
10
Boeing 757-300
4010
13
11
Boeing 777-300
6441
14
12
Boeing 767-400ER
6475
15
13
Airbus A320
2605
16
14
Airbus A319
1805
17
15
Boeing 727
1504

Questions and formulas:
Question: How many aircrafts do we have?
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D17))
Level: easy
Question: How many aircrafts exist in the database?
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D17))
Level: easy
Question: Show name and distance for all aircrafts.
Formula: SUMMARIZE(HSTACK(B1,D1),SUMX(C1))
Formula2: SUMMARIZE(HSTACK(B2:B17,D2:D17),SUMX(C2:C17))
Level: medium
Question: What are the names and distances for all airplanes?
Formula: SUMMARIZE(HSTACK(B1,D1),SUMX(C1))
Formula2: SUMMARIZE(HSTACK(B2:B17,D2:D17),SUMX(C2:C17))
Level: medium
Question: Show ids for all aircrafts with more than 1000 distance.
Formula: LET(query1,SUMMARIZE(HSTACK(A1,D1),SUMX(C1)),FILTER(query1,CHOOSECOLS(query1,3)>1000))
Formula2: LET(query1,SUMMARIZE(HSTACK(A2:A17,D2:D17),SUMX(C2:C17)),FILTER(query1,CHOOSECOLS(query1,3)>1000))
Level: hard
Question: What are the ids that can cover a distance of more than 1000?
Formula: LET(query1,SUMMARIZE(A1,SUMX(C1)),FILTER(query1,CHOOSECOLS(query1,2)>1000))
Formula2: LET(query1,SUMMARIZE(A2:A17,SUMX(C2:C17)),FILTER(query1,CHOOSECOLS(query1,2)>1000))
Level: hard
Question: How many aircrafts have distance between 1000 and 5000?
Formula: ROWS(UNIQUE(LET(a,D1,b,D1,c,INDEX(LET(query1,SUMMARIZE(D1,SUMX(C1)),FILTER(query1,(CHOOSECOLS(query1,2)<=5000)*(CHOOSECOLS(query1,2)>=1000))),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c)))))))
Formula2: ROWS(UNIQUE(LET(a,D2:D17,b,D2:D17,c,INDEX(LET(query1,SUMMARIZE(D2:D17,SUMX(C2:C17)),FILTER(query1,(CHOOSECOLS(query1,2)<=5000)*(CHOOSECOLS(query1,2)>=1000))),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c)))))))
Level: hard
Question: What is the count of aircrafts that have a distance between 1000 and 5000?
Formula: ROWS(UNIQUE(LET(a,D1,b,D1,c,INDEX(LET(query1,SUMMARIZE(D1,SUMX(C1)),FILTER(query1,(CHOOSECOLS(query1,2)>=1000)*(CHOOSECOLS(query1,2)<=5000))),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c)))))))
Formula2: ROWS(UNIQUE(LET(a,D2:D17,b,D2:D17,c,INDEX(LET(query1,SUMMARIZE(D2:D17,SUMX(C2:C17)),FILTER(query1,(CHOOSECOLS(query1,2)>=1000)*(CHOOSECOLS(query1,2)<=5000))),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c)))))))
Level: hard
Question: What is the name and distance for aircraft with id 12?
Formula: LET(query1,FILTER(A1:D1,A1=12),SUMMARIZE(HSTACK(CHOOSECOLS(query1,2,4)),SUMX(CHOOSECOLS(query1,3))))
Formula2: LET(query1,FILTER(A2:D17,A2:A17=12),SUMMARIZE(HSTACK(CHOOSECOLS(query1,2,4)),SUMX(CHOOSECOLS(query1,3))))
Level: hard
Question: Show the id and name of the aircraft with the maximum distance.
Formula: LET(a,HSTACK(A1,B1,D1),b,D1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D1,SUMX(C1)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(A2:A17,B2:B17,D2:D17),b,D2:D17,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D2:D17,SUMX(C2:C17)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: What is the id and name of the aircraft that can cover the maximum distance?
Formula: LET(a,HSTACK(A1,B1,D1),b,D1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D1,SUMX(C1)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(A2:A17,B2:B17,D2:D17),b,D2:D17,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D2:D17,SUMX(C2:C17)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: Show the name of aircrafts with top three lowest distances.
Formula: LET(a,HSTACK(B1,D1),b,D1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D1,SUMX(C1)), 2, 1), 3),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(B2:B17,D2:D17),b,D2:D17,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D2:D17,SUMX(C2:C17)), 2, 1), 3),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: the number of aircrafts
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D17))
Level: easy
Question: the amount of aircrafts
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D17))
Level: easy
Question: What are the airline ids for aircrafts that travel a distance great than 1000?
Formula: LET(a,HSTACK(A1,D1),b,D1,c,CHOOSECOLS(LET(query1,SUMMARIZE(D1,SUMX(C1)),FILTER(query1,CHOOSECOLS(query1,2)=1000)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(A2:A17,D2:D17),b,D2:D17,c,CHOOSECOLS(LET(query1,SUMMARIZE(D2:D17,SUMX(C2:C17)),FILTER(query1,CHOOSECOLS(query1,2)=1000)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: Airlines which covered a distance greater than 1000.
Formula: LET(query1,SUMMARIZE(A1,SUMX(C1)),FILTER(query1,CHOOSECOLS(query1,2)>1000))
Formula2: LET(query1,SUMMARIZE(A2:A17,SUMX(C2:C17)),FILTER(query1,CHOOSECOLS(query1,2)>1000))
Level: hard
Question: the number of aircrafts whose distances are between 1000 and 5000
Formula: ROWS(UNIQUE(LET(a,D1,b,D1,c,INDEX(LET(query1,SUMMARIZE(D1,SUMX(C1)),FILTER(query1,(CHOOSECOLS(query1,2)>=1000)*(CHOOSECOLS(query1,2)<=5000))),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c)))))))
Formula2: ROWS(UNIQUE(LET(a,D2:D17,b,D2:D17,c,INDEX(LET(query1,SUMMARIZE(D2:D17,SUMX(C2:C17)),FILTER(query1,(CHOOSECOLS(query1,2)>=1000)*(CHOOSECOLS(query1,2)<=5000))),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c)))))))
Level: hard
Question: the number of aircrafts that travel a distance between 1000 and 5000.
Formula: ROWS(UNIQUE(LET(a,D1,b,D1,c,INDEX(LET(query1,SUMMARIZE(D1,SUMX(C1)),FILTER(query1,(CHOOSECOLS(query1,2)>=1000)*(CHOOSECOLS(query1,2)<=5000))),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c)))))))
Formula2: ROWS(UNIQUE(LET(a,D2:D17,b,D2:D17,c,INDEX(LET(query1,SUMMARIZE(D2:D17,SUMX(C2:C17)),FILTER(query1,(CHOOSECOLS(query1,2)>=1000)*(CHOOSECOLS(query1,2)<=5000))),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c)))))))
Level: hard
Question: the id, name and aircraft with the furtherest distance.
Formula: TAKE(SORT(SUMMARIZE(HSTACK(A1,B1,D1),SUMX(C1)), 4, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(HSTACK(A2:A17,B2:B17,D2:D17),SUMX(C2:C17)), 4, -1), 1)
Level: hard
Question: the airline ID and name of the aircraft that travels the furthest distance 
Formula: LET(a,HSTACK(A1,B1,D1),b,D1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D1,SUMX(C1)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(A2:A17,B2:B17,D2:D17),b,D2:D17,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D2:D17,SUMX(C2:C17)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: What are the names of 3 aircrafts with shortest traveling distances.
Formula: LET(a,HSTACK(B1,D1),b,D1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D1,SUMX(C1)), 2, 1), 3),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(B2:B17,D2:D17),b,D2:D17,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D2:D17,SUMX(C2:C17)), 2, 1), 3),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: Ids for aircrafts which have traveled a distance more than 1000.
Formula: LET(a,HSTACK(A1,D1),b,D1,c,CHOOSECOLS(LET(query1,SUMMARIZE(D1,SUMX(C1)),FILTER(query1,CHOOSECOLS(query1,2)>1000)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(A2:A17,D2:D17),b,D2:D17,c,CHOOSECOLS(LET(query1,SUMMARIZE(D2:D17,SUMX(C2:C17)),FILTER(query1,CHOOSECOLS(query1,2)>1000)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: the number of aircrafts with a distance between 1000 and 5000.
Formula: ROWS(UNIQUE(LET(a,D1,b,D1,c,INDEX(LET(query1,SUMMARIZE(D1,SUMX(C1)),FILTER(query1,(CHOOSECOLS(query1,2)<=5000)*(CHOOSECOLS(query1,2)>=1000))),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c)))))))
Formula2: ROWS(UNIQUE(LET(a,D2:D17,b,D2:D17,c,INDEX(LET(query1,SUMMARIZE(D2:D17,SUMX(C2:C17)),FILTER(query1,(CHOOSECOLS(query1,2)<=5000)*(CHOOSECOLS(query1,2)>=1000))),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c)))))))
Level: hard
Question: Ids, names and aircrafts with a longest flying distance.
Formula: TAKE(SORT(SUMMARIZE(HSTACK(A1,B1,D1),SUMX(C1)), 4, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(HSTACK(A2:A17,B2:B17,D2:D17),SUMX(C2:C17)), 4, -1), 1)
Level: hard
Question: the airline id and name of the aircraft with the furthest distance
Formula: LET(a,HSTACK(A1,B1,D1),b,D1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D1,SUMX(C1)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(A2:A17,B2:B17,D2:D17),b,D2:D17,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(D2:D17,SUMX(C2:C17)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard