Table:
0
A
B
C
D
E
F
1
city id
official name
status
area km 2
population
census ranking
2
1
Grand Falls/Grand-Sault
Town
18.06
5706
636 of 5008
3
2
Perth-Andover
Village
8.89
1778
1442 of 5,008
4
3
Plaster Rock
Village
3.09
1135
1936 of 5,008
5
4
Drummond
Village
8.91
775
2418 of 5008
6
5
Aroostook
Village
2.24
351
3460 of 5008

Questions and formulas:
Question: How many different statuses do each city have?
Formula: SUMMARIZE(A1,DCOUNTX(C1))
Formula2: SUMMARIZE(A2:A6,DCOUNTX(C2:C6))
Level: easy
Question: Count the number of different statuses.
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C6))
Level: easy
Question: List official names of cities in descending order of population.
Formula: SORTBY(B1,E1,-1)
Formula2: SORTBY(B2:B6,E2:E6,-1)
Level: easy
Question: What are the official names of cities, ordered descending by population?
Formula: SORTBY(B1,E1,-1)
Formula2: SORTBY(B2:B6,E2:E6,-1)
Level: easy
Question: List the official name and status of the city with the largest population.
Formula: LET(a,SORTBY(CHOOSE({1,2},B1,C1),E1,-1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Formula2: LET(a,SORTBY(CHOOSE({1,2},B2:B6,C2:C6),E2:E6,-1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Level: hard
Question: Please show the different statuses of cities and the average population of cities with each status.
Formula: SUMMARIZE(HSTACK(C1,A1),AVERAGEX(E1))
Formula2: SUMMARIZE(HSTACK(C2:C6,A2:A6),AVERAGEX(E2:E6))
Level: medium
Question: What are the statuses and average populations of each city?
Formula: SUMMARIZE(HSTACK(C1,A1),AVERAGEX(E1))
Formula2: SUMMARIZE(HSTACK(C2:C6,A2:A6),AVERAGEX(E2:E6))
Level: medium
Question: Show the census ranking of cities whose status are not "Village".
Formula: FILTER(F1,C1<>"Village")
Formula2: FILTER(F2:F6,C2:C6<>"Village")
Level: easy
Question: What are the census rankings of cities that do not have the status "Village"?
Formula: FILTER(F1,C1<>"Village")
Formula2: FILTER(F2:F6,C2:C6<>"Village")
Level: easy
Question: How many statuses and cities?
Formula: HSTACK(ROWS(UNIQUE(C1)), SUM(A1))
Formula2: HSTACK(ROWS(UNIQUE(C2:C6)), SUM(A2:A6))
Level: hard
Question: How many statuses?
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C6))
Level: easy
Question: the official name, status and city id of the most populated farm.
Formula: TAKE(SORT(SUMMARIZE(HSTACK(B1,C1,A1),SUMX(E1)), 4, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(HSTACK(B2:B6,C2:C6,A2:A6),SUMX(E2:E6)), 4, -1), 1)
Level: hard
Question: Census rankings and cities for farms not located in villages.
Formula: LET(query1,FILTER(A1:F1,C1<>"village"),UNIQUE(CHOOSECOLS(query1,6,1)))
Formula2: LET(query1,FILTER(A2:F6,C2:C6<>"village"),UNIQUE(CHOOSECOLS(query1,6,1)))
Level: hard
Question: all census rankings and cities for farms apart from villages.
Formula: LET(query1,FILTER(A1:F1,C1<>"village"),UNIQUE(CHOOSECOLS(query1,6,1)))
Formula2: LET(query1,FILTER(A2:F6,C2:C6<>"village"),UNIQUE(CHOOSECOLS(query1,6,1)))
Level: hard
Question: Census rankings and cities for non-village farms.
Formula: LET(query1,FILTER(A1:F1,C1<>"village"),UNIQUE(CHOOSECOLS(query1,6,1)))
Formula2: LET(query1,FILTER(A2:F6,C2:C6<>"village"),UNIQUE(CHOOSECOLS(query1,6,1)))
Level: hard