Table:
0
A
B
C
D
E
F
G
1
captain id
name
ship id
age
class
rank
2
1
Captain Sir Henry Langford
1
40
Third-rate ship of the line
Midshipman
3
2
Captain Beves Conway
2
54
Third-rate ship of the line
Midshipman
4
3
Lieutenant Hugh Bolitho
3
43
Cutter
Midshipman
5
4
Lieutenant Montagu Verling
4
45
Armed schooner
Midshipman
6
5
Captain Henry Dumaresq
5
38
Frigate
Lieutenant
7
6
Captain Gilbert Pears
2
60
Third-rate ship of the line
Lieutenant
8
7
Commander Richard Bolitho
3
38
Sloop-of-war
Commander, junior captain

Questions and formulas:
Question: How many different captain ranks are there?
Formula: ROWS(UNIQUE(F1))
Formula2: ROWS(UNIQUE(F2:F8))
Level: easy
Question: Count the number of different ranks of captain.
Formula: ROWS(UNIQUE(F1))
Formula2: ROWS(UNIQUE(F2:F8))
Level: easy
Question: How many captains are in each rank?
Formula: SUMMARIZE(F1,SUMX(A1))
Formula2: SUMMARIZE(F2:F8,SUMX(A2:A8))
Level: easy
Question: Count the number of captains that have each rank.
Formula: SUMMARIZE(F1,SUMX(A1))
Formula2: SUMMARIZE(F2:F8,SUMX(A2:A8))
Level: easy
Question: Sort all captain names by their ages from old to young.
Formula: SORTBY(B1,D1,-1)
Formula2: SORTBY(B2:B8,D2:D8,-1)
Level: easy
Question: What are the names of captains, sorted by age descending?
Formula: SORTBY(B1,D1,-1)
Formula2: SORTBY(B2:B8,D2:D8,-1)
Level: easy
Question: Find the name, class and rank of all captains.
Formula: CHOOSE({1,2,3},B1,E1,F1)
Formula2: CHOOSE({1,2,3},B2:B8,E2:E8,F2:F8)
Level: easy
Question: What are the names, classes, and ranks of all captains?
Formula: CHOOSE({1,2,3},B1,E1,F1)
Formula2: CHOOSE({1,2,3},B2:B8,E2:E8,F2:F8)
Level: easy
Question: Which rank is the most common among captains?
Formula: TAKE(SORT(SUMMARIZE(F1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(F2:F8,SUMX(A2:A8)), 2, -1), 1)
Level: hard
Question: Return the rank for which there are the fewest captains.
Formula: TAKE(SORT(SUMMARIZE(F1,SUMX(A1)), 2, 1), 1)
Formula2: TAKE(SORT(SUMMARIZE(F2:F8,SUMX(A2:A8)), 2, 1), 1)
Level: hard
Question: Which classes have more than two captains?
Formula: LET(query1,SUMMARIZE(E1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Formula2: LET(query1,SUMMARIZE(E2:E8,SUMX(A2:A8)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Level: hard
Question: Give the classes that have more than two captains.
Formula: LET(query1,SUMMARIZE(E1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Formula2: LET(query1,SUMMARIZE(E2:E8,SUMX(A2:A8)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Level: hard
Question: Find the name of captains whose rank are either Midshipman or Lieutenant.
Formula: FILTER(B1,(F1="Midshipman")+(F1="Lieutenant"))
Formula2: FILTER(B2:B8,(F2:F8="Midshipman")+(F2:F8="Lieutenant"))
Level: easy
Question: What are the captain names that have either the rank Midshipman or Lieutenant?
Formula: LET(query1,FILTER(A1:G1,(F1="lieutenant")+(F1="midshipman")),UNIQUE(CHOOSECOLS(query1,1,2)))
Formula2: LET(query1,FILTER(A2:G8,(F2:F8="lieutenant")+(F2:F8="midshipman")),UNIQUE(CHOOSECOLS(query1,1,2)))
Level: hard
Question: What is the name of the youngest captain?
Formula: LET(a,SORTBY(B1,D1,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Formula2: LET(a,SORTBY(B2:B8,D2:D8,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Level: hard
Question: Return the name of the youngest captain.
Formula: LET(a,SORTBY(B1,D1,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Formula2: LET(a,SORTBY(B2:B8,D2:D8,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Level: hard
Question: Total number of captains and ranks respectively 
Formula: HSTACK(SUM(A1), ROWS(UNIQUE(F1)))
Formula2: HSTACK(SUM(A2:A8), ROWS(UNIQUE(F2:F8)))
Level: hard
Question: How many ranks and captains are there respectively?
Formula: HSTACK(ROWS(UNIQUE(F1)), SUM(A1))
Formula2: HSTACK(ROWS(UNIQUE(F2:F8)), SUM(A2:A8))
Level: hard
Question: Total number of captains for each rank.
Formula: SUMMARIZE(F1,SUMX(A1))
Formula2: SUMMARIZE(F2:F8,SUMX(A2:A8))
Level: easy
Question: How many captains under each rank?
Formula: SUMMARIZE(F1,SUMX(A1))
Formula2: SUMMARIZE(F2:F8,SUMX(A2:A8))
Level: easy
Question: What is the name, id, class and rank of each captain?
Formula: UNIQUE(HSTACK(B1,E1,F1,A1))
Formula2: UNIQUE(HSTACK(B2:B8,E2:E8,F2:F8,A2:A8))
Level: easy
Question: Show the names, classes and ranks for all captains.
Formula: UNIQUE(HSTACK(B1,E1,F1,A1))
Formula2: UNIQUE(HSTACK(B2:B8,E2:E8,F2:F8,A2:A8))
Level: easy
Question: Which classes had more than two captains?
Formula: LET(query1,SUMMARIZE(E1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Formula2: LET(query1,SUMMARIZE(E2:E8,SUMX(A2:A8)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Level: hard
Question: Which classes had more than two captains?
Formula: LET(query1,SUMMARIZE(E1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Formula2: LET(query1,SUMMARIZE(E2:E8,SUMX(A2:A8)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Level: hard
Question: All ids and names of midshipmen or lieutenants.
Formula: LET(query1,FILTER(A1:G1,(F1="midshipman")+(F1="lieutenant")),UNIQUE(CHOOSECOLS(query1,2,1)))
Formula2: LET(query1,FILTER(A2:G8,(F2:F8="midshipman")+(F2:F8="lieutenant")),UNIQUE(CHOOSECOLS(query1,2,1)))
Level: hard
Question: Who are ranked as midshipman or lieutenant and what are their ids?
Formula: LET(query1,FILTER(A1:G1,(F1="midshipman")+(F1="lieutenant")),UNIQUE(CHOOSECOLS(query1,1,2)))
Formula2: LET(query1,FILTER(A2:G8,(F2:F8="midshipman")+(F2:F8="lieutenant")),UNIQUE(CHOOSECOLS(query1,1,2)))
Level: hard
Question: The name of the youngest captain
Formula: LET(a,HSTACK(B1,A1),b,A1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(A1,SUMX(D1)), 2, 1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(B2:B8,A2:A8),b,A2:A8,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(A2:A8,SUMX(D2:D8)), 2, 1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: The youngest captain's name
Formula: TAKE(SORT(SUMMARIZE(HSTACK(A1,B1),SUMX(D1)), 3, 1), 1)
Formula2: TAKE(SORT(SUMMARIZE(HSTACK(A2:A8,B2:B8),SUMX(D2:D8)), 3, 1), 1)
Level: hard
Question: The respective number of captains and ranks
Formula: HSTACK(SUM(A1), ROWS(UNIQUE(F1)))
Formula2: HSTACK(SUM(A2:A8), ROWS(UNIQUE(F2:F8)))
Level: hard
Question: How many ranks and captains are there?
Formula: HSTACK(ROWS(UNIQUE(F1)), SUM(A1))
Formula2: HSTACK(ROWS(UNIQUE(F2:F8)), SUM(A2:A8))
Level: hard
Question: The number of captains in each rank.
Formula: SUMMARIZE(F1,SUMX(A1))
Formula2: SUMMARIZE(F2:F8,SUMX(A2:A8))
Level: easy
Question: Names, classes, ranks for all captains.
Formula: UNIQUE(HSTACK(B1,E1,F1,A1))
Formula2: UNIQUE(HSTACK(B2:B8,E2:E8,F2:F8,A2:A8))
Level: easy
Question: Which rank does most captains have?
Formula: TAKE(SORT(SUMMARIZE(F1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(F2:F8,SUMX(A2:A8)), 2, -1), 1)
Level: hard
Question: Which rank is shared by least captains?
Formula: TAKE(SORT(SUMMARIZE(F1,SUMX(A1)), 2, 1), 1)
Formula2: TAKE(SORT(SUMMARIZE(F2:F8,SUMX(A2:A8)), 2, 1), 1)
Level: hard
Question: The classes with more than two captains.
Formula: LET(query1,SUMMARIZE(E1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Formula2: LET(query1,SUMMARIZE(E2:E8,SUMX(A2:A8)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Level: hard
Question: Which class had more than 2 captains?
Formula: LET(query1,SUMMARIZE(E1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Formula2: LET(query1,SUMMARIZE(E2:E8,SUMX(A2:A8)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Level: hard
Question: The id and name of midshipman or lieutenant.
Formula: LET(query1,FILTER(A1:G1,(F1="midshipman")+(F1="lieutenant")),UNIQUE(CHOOSECOLS(query1,2,1)))
Formula2: LET(query1,FILTER(A2:G8,(F2:F8="midshipman")+(F2:F8="lieutenant")),UNIQUE(CHOOSECOLS(query1,2,1)))
Level: hard