Table:
0
A
B
C
D
E
F
G
H
I
1
city id
county id
name
white
black
amerindian
asian
multiracial
hispanic
2
1
1
Adjuntas
93.1
3.1
0.3
0
3.4
99.6
3
2
1
Aguada
86.6
5.3
0.3
0.1
7.7
99.4
4
3
1
Aguadilla
83
7.4
0.3
0.2
8.2
98.5
5
4
2
Aguas Buenas
72.5
12.6
0.6
0.1
14.2
99.5
6
5
2
Aibonito
83.5
7.3
0.2
0
9
99.3
7
6
3
Añasco
82
7.2
0.4
0.1
10.3
99.2
8
7
3
Arecibo
84.5
6.1
0.4
0.1
7.9
99.2
9
8
3
Arroyo
53.5
32.5
0.9
0.2
13
99.1
10
9
3
Barceloneta
80.7
7.6
0.3
0.1
11.2
99.4
11
10
3
Barranquitas
86
5.4
0.3
0
8.3
99.3
12
11
3
Bayamón
78.3
10.3
0.6
0.2
10.7
99
13
12
4
Cabo Rojo
84.1
5.4
0.3
0.1
10.1
98.9
14
13
4
Caguas
76.1
11
0.6
0.2
12.1
99.1
15
14
5
Camuy
87.9
4.1
0.3
0.1
7.6
99.4
16
15
5
Canóvanas
61.2
21.6
0.9
0.2
16.1
99.2
17
16
6
Carolina
64.3
22.8
0.9
0.4
11.7
98.6
18
17
6
Cataño
70.7
14.4
1
0.3
13.7
99

Questions and formulas:
Question: What are the percentage of hispanics in cities with the black percentage higher than 10?
Formula: FILTER(I1,E1>10)
Formula2: FILTER(I2:I18,E2:E18>10)
Level: easy
Question: Return the hispanic percentage for cities in which the black percentage is greater than 10.
Formula: FILTER(I1,E1>10)
Formula2: FILTER(I2:I18,E2:E18>10)
Level: easy
Question: List the names of the city with the top 5 white percentages.
Formula: LET(a,SORTBY(C1,D1,-1),FILTER(a,SEQUENCE(ROWS(a))<=5))
Formula2: LET(a,SORTBY(C2:C18,D2:D18,-1),FILTER(a,SEQUENCE(ROWS(a))<=5))
Level: hard
Question: What are the names of the five cities with the greatest proportion of white people?
Formula: LET(a,SORTBY(C1,D1,-1),FILTER(a,SEQUENCE(ROWS(a))<=5))
Formula2: LET(a,SORTBY(C2:C18,D2:D18,-1),FILTER(a,SEQUENCE(ROWS(a))<=5))
Level: hard
Question: the 5 cities with the most white people
Formula: TAKE(SORT(SUMMARIZE(A1,SUMX(D1)), 2, -1), 5)
Formula2: TAKE(SORT(SUMMARIZE(A2:A18,SUMX(D2:D18)), 2, -1), 5)
Level: hard
Question: Names of 5 cities having most white people.
Formula: LET(a,HSTACK(C1,A1),b,A1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(A1,SUMX(D1)), 2, -1), 5),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(C2:C18,A2:A18),b,A2:A18,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(A2:A18,SUMX(D2:D18)), 2, -1), 5),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: the names of the top 5 cities in % of white.
Formula: LET(a,HSTACK(C1,A1),b,A1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(A1,SUMX(D1)), 2, -1), 5),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(C2:C18,A2:A18),b,A2:A18,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(A2:A18,SUMX(D2:D18)), 2, -1), 5),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard