Table:
0
A
B
C
D
E
F
G
H
1
flight number
origin
destination
distance
departure date
arrival date
price
airline id
2
99
Los Angeles
Washington D.C.
2308
4/12/2005 9:30
4/12/2005 9:40
235.98
1
3
13
Los Angeles
Chicago
1749
4/12/2005 8:45
4/12/2005 8:45
220.98
3
4
346
Los Angeles
Dallas
1251
4/12/2005 11:50
4/12/2005 7:05
182
2
5
387
Los Angeles
Boston
2606
4/12/2005 7:03
4/12/2005 5:03
261.56
6
6
7
Los Angeles
Sydney
7487
4/12/2005 5:30
4/12/2005 11:10
278.56
3
7
2
Los Angeles
Tokyo
5478
4/12/2005 6:30
4/12/2005 3:55
780.99
9
8
33
Los Angeles
Honolulu
2551
4/12/2005 9:15
4/12/2005 11:15
375.23
7
9
34
Los Angeles
Honolulu
2551
4/12/2005 12:45
4/12/2005 3:18
425.98
5
10
76
Chicago
Los Angeles
1749
4/12/2005 8:32
4/12/2005 10:03
220.98
9
11
68
Chicago
New York
802
4/12/2005 9:00
4/12/2005 12:02
202.45
10

Questions and formulas:
Question: How many flights do we have?
Formula: SUM(A1)
Formula2: SUM(A2:A11)
Level: easy
Question: What is the number of flights?
Formula: SUM(A1)
Formula2: SUM(A2:A11)
Level: easy
Question: Show origins of all flights with destination Honolulu.
Formula: FILTER(B1,C1="Honolulu")
Formula2: FILTER(B2:B11,C2:C11="Honolulu")
Level: easy
Question: What are the origins of all flights that are headed to Honolulu?
Formula: FILTER(B1,C1="Honolulu")
Formula2: FILTER(B2:B11,C2:C11="Honolulu")
Level: easy
Question: Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.
Formula: CHOOSE({1,2},FILTER(E1,(B1="Los Angeles")*(C1="Honolulu")),FILTER(F1,(B1="Los Angeles")*(C1="Honolulu")))
Formula2: CHOOSE({1,2},FILTER(E2:E11,(B2:B11="Los Angeles")*(C2:C11="Honolulu")),FILTER(F2:F11,(B2:B11="Los Angeles")*(C2:C11="Honolulu")))
Level: medium
Question: Show flight number for all flights with more than 2000 distance.
Formula: FILTER(A1,D1>2000)
Formula2: FILTER(A2:A11,D2:D11>2000)
Level: easy
Question: What are the numbers of all flights that can cover a distance of more than 2000?
Formula: FILTER(A1,D1>2000)
Formula2: FILTER(A2:A11,D2:D11>2000)
Level: easy
Question: What is the average price for flights from Los Angeles to Honolulu.
Formula: AVERAGE(FILTER(G1,(B1="Los Angeles")*(C1="Honolulu")))
Formula2: AVERAGE(FILTER(G2:G11,(B2:B11="Los Angeles")*(C2:C11="Honolulu")))
Level: easy
Question: Show origin and destination for flights with price higher than 300.
Formula: CHOOSE({1,2},FILTER(B1,G1>300),FILTER(C1,G1>300))
Formula2: CHOOSE({1,2},FILTER(B2:B11,G2:G11>300),FILTER(C2:C11,G2:G11>300))
Level: medium
Question: What is the origin and destination for all flights whose price is higher than 300?
Formula: CHOOSE({1,2},FILTER(B1,G1>300),FILTER(C1,G1>300))
Formula2: CHOOSE({1,2},FILTER(B2:B11,G2:G11>300),FILTER(C2:C11,G2:G11>300))
Level: medium
Question: What is the average distance and average price from Los Angeles.
Formula: HSTACK(AVERAGE(FILTER(D1, B1="los angeles")),AVERAGE(FILTER(G1, B1="los angeles")))
Formula2: HSTACK(AVERAGE(FILTER(D2:D11, B2:B11="los angeles")),AVERAGE(FILTER(G2:G11, B2:B11="los angeles")))
Level: hard
Question: Show all origins and the number of flights from each origin.
Formula: SUMMARIZE(B1,SUMX(A1))
Formula2: SUMMARIZE(B2:B11,SUMX(A2:A11))
Level: easy
Question: For each origin, how many flights came from there?
Formula: SUMMARIZE(B1,SUMX(A1))
Formula2: SUMMARIZE(B2:B11,SUMX(A2:A11))
Level: easy
Question: Show all destinations and the number of flights to each destination.
Formula: SUMMARIZE(C1,SUMX(A1))
Formula2: SUMMARIZE(C2:C11,SUMX(A2:A11))
Level: easy
Question: Which origin has most number of flights?
Formula: TAKE(SORT(SUMMARIZE(B1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B11,SUMX(A2:A11)), 2, -1), 1)
Level: hard
Question: Which destination has least number of flights?
Formula: TAKE(SORT(SUMMARIZE(C1,SUMX(A1)), 2, 1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C11,SUMX(A2:A11)), 2, 1), 1)
Level: hard
Question: What destination has the fewest number of flights?
Formula: TAKE(SORT(SUMMARIZE(C1,SUMX(A1)), 2, 1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C11,SUMX(A2:A11)), 2, 1), 1)
Level: hard
Question: Numbe of flights from each origin point
Formula: SUMMARIZE(B1,SUMX(A1))
Formula2: SUMMARIZE(B2:B11,SUMX(A2:A11))
Level: easy
Question: the total number of flights from different origins
Formula: SUMMARIZE(B1,SUMX(A1))
Formula2: SUMMARIZE(B2:B11,SUMX(A2:A11))
Level: easy
Question: Which origin point has the most flights from it?
Formula: TAKE(SORT(SUMMARIZE(B1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B11,SUMX(A2:A11)), 2, -1), 1)
Level: hard
Question: Destination having smallest flight number.
Formula: TAKE(SORT(SUMMARIZE(C1,SUMX(A1)), 2, 1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C11,SUMX(A2:A11)), 2, 1), 1)
Level: hard
Question: The destination with the least flights
Formula: TAKE(SORT(SUMMARIZE(C1,SUMX(A1)), 2, 1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C11,SUMX(A2:A11)), 2, 1), 1)
Level: hard
Question: How many flights from each origin?
Formula: SUMMARIZE(B1,SUMX(A1))
Formula2: SUMMARIZE(B2:B11,SUMX(A2:A11))
Level: easy
Question: the origin with the most flights
Formula: TAKE(SORT(SUMMARIZE(B1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B11,SUMX(A2:A11)), 2, -1), 1)
Level: hard