Table:
0
A
B
C
D
E
F
1
driver id
name
party
home city
age
2
1
Matthew Ritter
Dem
Hartford
40
3
2
Dan Carter
Rep
Bethel
30
4
3
Minnie Gonzalez
Dem
Hartford
46
5
4
Angel Acre
Dem
Hartford
42
6
5
Brandon McGee
Dem
Hartford
45
7
6
Edwin Vargas
Dem
Hartford
52
8
7
Douglas McCrory
Dem
Hartford
36
9
8
Timothy Ackert
Rep
Coventry
35
10
9
Jason Rojas
Dem
East Hartford
38
11
10
Henry Genga
Dem
East Hartford
37
12
11
Tim Larson
Dem
East Hartford
36
13
12
Geoff Luxenberg
Dem
Manchester
52

Questions and formulas:
Question: How many drivers are there?
Formula: SUM(A1)
Formula2: SUM(A2:A13)
Level: easy
Question: Show the name, home city, and age for all drivers.
Formula: CHOOSE({1,2,3},B1,D1,E1)
Formula2: CHOOSE({1,2,3},B2:B13,D2:D13,E2:E13)
Level: easy
Question: Show the party and the number of drivers in each party.
Formula: SUMMARIZE(C1,SUMX(A1))
Formula2: SUMMARIZE(C2:C13,SUMX(A2:A13))
Level: easy
Question: Show the name of drivers in descending order of age.
Formula: SORTBY(B1,E1,-1)
Formula2: SORTBY(B2:B13,E2:E13,-1)
Level: easy
Question: Show all different home cities.
Formula: UNIQUE(D1)
Formula2: UNIQUE(D2:D13)
Level: easy
Question: Show the home city with the most number of drivers.
Formula: TAKE(SORT(SUMMARIZE(D1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(D2:D13,SUMX(A2:A13)), 2, -1), 1)
Level: hard
Question: Show the party with drivers from Hartford and drivers older than 40.
Formula: FILTER(C1,(D1="Hartford")*(E1>40))
Formula2: FILTER(C2:C13,(D2:D13="Hartford")*(E2:E13>40))
Level: easy
Question: Show home city where at least two drivers older than 40 are from.
Formula: LET(query1,SUMMARIZE(D1,SUMX(A1),SUMX(E1)),FILTER(query1,(CHOOSECOLS(query1,3)>40)*(CHOOSECOLS(query1,4)>=2)))
Formula2: LET(query1,SUMMARIZE(D2:D13,SUMX(A2:A13),SUMX(E2:E13)),FILTER(query1,(CHOOSECOLS(query1,3)>40)*(CHOOSECOLS(query1,4)>=2)))
Level: hard
Question: How many drivers are from Hartford city or younger than 40?
Formula: ROWS(FILTER(A1,(D1="Hartford")+(E1<40)))
Formula2: ROWS(FILTER(A2:A13,(D2:D13="Hartford")+(E2:E13<40)))
Level: easy
Question: List names for drivers from Hartford city and younger than 40.
Formula: FILTER(B1,(D1="Hartford")*(E1<40))
Formula2: FILTER(B2:B13,(D2:D13="Hartford")*(E2:E13<40))
Level: easy
Question: How many drivers are there?
Formula: SUM(A1)
Formula2: SUM(A2:A13)
Level: easy
Question: Compare the number of drivers among parties.
Formula: SUMMARIZE(C1,SUMX(A1))
Formula2: SUMMARIZE(C2:C13,SUMX(A2:A13))
Level: easy
Question: Drivers' names and ids in order of oldest to youngest.
Formula: SORT(SUMMARIZE(HSTACK(A1,B1),SUMX(E1)), 3, -1)
Formula2: SORT(SUMMARIZE(HSTACK(A2:A13,B2:B13),SUMX(E2:E13)), 3, -1)
Level: hard
Question: All home cities
Formula: UNIQUE(D1)
Formula2: UNIQUE(D2:D13)
Level: easy
Question: Where do most drivers come from?
Formula: TAKE(SORT(SUMMARIZE(D1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(D2:D13,SUMX(A2:A13)), 2, -1), 1)
Level: hard
Question: The party having hartford drivers aged 40+ and their corresponding ids.
Formula: LET(query1,LET(query1,FILTER(A1:F1,D1="hartford"),SUMMARIZE(HSTACK(CHOOSECOLS(query1,3,1)),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,3)>40))
Formula2: LET(query1,LET(query1,FILTER(A2:F13,D2:D13="hartford"),SUMMARIZE(HSTACK(CHOOSECOLS(query1,3,1)),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,3)>40))
Level: hard
Question: Cities with at least 2 drivers over 40 years old
Formula: LET(query1,SUMMARIZE(D1,SUMX(A1),SUMX(E1)),FILTER(query1,(CHOOSECOLS(query1,3)>40)*(CHOOSECOLS(query1,4)>=2)))
Formula2: LET(query1,SUMMARIZE(D2:D13,SUMX(A2:A13),SUMX(E2:E13)),FILTER(query1,(CHOOSECOLS(query1,3)>40)*(CHOOSECOLS(query1,4)>=2)))
Level: hard
Question: How many Hartford drivers are less than 40 years old?
Formula: SUM(LET(a,A1,b,A1,c,INDEX(LET(query1,LET(query1,FILTER(A1:F1,D1="hartford"),SUMMARIZE(CHOOSECOLS(query1,1),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,2)<40)),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: SUM(LET(a,A2:A13,b,A2:A13,c,INDEX(LET(query1,LET(query1,FILTER(A2:F13,D2:D13="hartford"),SUMMARIZE(CHOOSECOLS(query1,1),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,2)<40)),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: Names and ids of under 40 hartford drivers.
Formula: LET(query1,LET(query1,FILTER(A1:F1,D1="hartford"),SUMMARIZE(HSTACK(CHOOSECOLS(query1,2,1)),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,3)<40))
Formula2: LET(query1,LET(query1,FILTER(A2:F13,D2:D13="hartford"),SUMMARIZE(HSTACK(CHOOSECOLS(query1,2,1)),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,3)<40))
Level: hard
Question: The number of drivers.
Formula: SUM(A1)
Formula2: SUM(A2:A13)
Level: easy
Question: The names and ids of drivers from oldest to youngest.
Formula: SORT(SUMMARIZE(HSTACK(A1,B1),SUMX(E1)), 3, -1)
Formula2: SORT(SUMMARIZE(HSTACK(A2:A13,B2:B13),SUMX(E2:E13)), 3, -1)
Level: hard
Question: The home cities.
Formula: UNIQUE(D1)
Formula2: UNIQUE(D2:D13)
Level: easy
Question: Which home city has at least 2 drivers over 40?
Formula: LET(query1,SUMMARIZE(D1,SUMX(A1),SUMX(E1)),FILTER(query1,(CHOOSECOLS(query1,3)>40)*(CHOOSECOLS(query1,4)>=2)))
Formula2: LET(query1,SUMMARIZE(D2:D13,SUMX(A2:A13),SUMX(E2:E13)),FILTER(query1,(CHOOSECOLS(query1,3)>40)*(CHOOSECOLS(query1,4)>=2)))
Level: hard
Question: How many drivers are younger than 40 and come from hartford?
Formula: SUM(LET(a,A1,b,A1,c,INDEX(LET(query1,LET(query1,FILTER(A1:F1,D1="hartford"),SUMMARIZE(CHOOSECOLS(query1,1),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,2)<40)),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: SUM(LET(a,A2:A13,b,A2:A13,c,INDEX(LET(query1,LET(query1,FILTER(A2:F13,D2:D13="hartford"),SUMMARIZE(CHOOSECOLS(query1,1),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,2)<40)),,1),FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: The name and id of the hartford driver under 40 years old.
Formula: LET(query1,LET(query1,FILTER(A1:F1,D1="hartford"),SUMMARIZE(HSTACK(CHOOSECOLS(query1,2,1)),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,3)<40))
Formula2: LET(query1,LET(query1,FILTER(A2:F13,D2:D13="hartford"),SUMMARIZE(HSTACK(CHOOSECOLS(query1,2,1)),SUMX(CHOOSECOLS(query1,5)))),FILTER(query1,CHOOSECOLS(query1,3)<40))
Level: hard