Table:
0
A
B
C
D
E
F
G
H
I
1
party id
year
party name
governor
lieutenant governor
comptroller
attorney general
us senate
records
2
1
1998
Democratic
Peter Vallone
Sandra Frankel
Carl McCall
Eliot Spitzer
Charles Schumer
2
3
2
1998
Liberal
Betsy McCaughey Ross
Jonathan Reiter
Carl McCall
Eliot Spitzer
Charles Schumer
3
4
3
2002
Democratic
Carl McCall
Dennis Mehiel
Alan Hevesi
Eliot Spitzer
(no election)
4
5
4
2002
Independence
Tom Golisano
Mary Donohue
John Faso
Eliot Spitzer
(no election)
5
6
5
2006
Democratic
Eliot Spitzer
David Paterson
Alan Hevesi
Andrew Cuomo
Hillary Rodham Clinton
6
7
6
2006
Independence
Eliot Spitzer
David Paterson
Alan Hevesi
Jeanine Pirro
Hillary Rodham Clinton
7
8
7
2006
Working Families
Eliot Spitzer
David Paterson
Alan Hevesi
Andrew Cuomo
Hillary Rodham Clinton
8

Questions and formulas:
Question: How many distinct governors are there?
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D8))
Level: easy
Question: Count the number of distinct governors.
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D8))
Level: easy
Question: Show the lieutenant governor and comptroller from the democratic party.
Formula: CHOOSE({1,2},FILTER(E1,C1="Democratic"),FILTER(F1,C1="Democratic"))
Formula2: CHOOSE({1,2},FILTER(E2:E8,C2:C8="Democratic"),FILTER(F2:F8,C2:C8="Democratic"))
Level: medium
Question: Who are the lieutenant governor and comptroller from the democratic party?
Formula: CHOOSE({1,2},FILTER(E1,C1="Democratic"),FILTER(F1,C1="Democratic"))
Formula2: CHOOSE({1,2},FILTER(E2:E8,C2:C8="Democratic"),FILTER(F2:F8,C2:C8="Democratic"))
Level: medium
Question: In which distinct years was the governor "Eliot Spitzer"?
Formula: UNIQUE(FILTER(B1,D1="Eliot Spitzer"))
Formula2: UNIQUE(FILTER(B2:B8,D2:D8="Eliot Spitzer"))
Level: easy
Question: Show the name of the party that has at least two records.
Formula: LET(a,HSTACK(C1,A1),b,A1,c,CHOOSECOLS(LET(query1,SUMMARIZE(A1,SUMX(I1)),FILTER(query1,CHOOSECOLS(query1,2)>=2)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(C2:C8,A2:A8),b,A2:A8,c,CHOOSECOLS(LET(query1,SUMMARIZE(A2:A8,SUMX(I2:I8)),FILTER(query1,CHOOSECOLS(query1,2)>=2)),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: Which party has two or more records?
Formula: LET(query1,SUMMARIZE(A1,SUMX(I1)),FILTER(query1,CHOOSECOLS(query1,2)>=2))
Formula2: LET(query1,SUMMARIZE(A2:A8,SUMX(I2:I8)),FILTER(query1,CHOOSECOLS(query1,2)>=2))
Level: hard
Question: How many governors are there in total?
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D8))
Level: easy
Question: What's the total number of governors?
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D8))
Level: easy
Question: show all democratic lieutenant governors, comptrollers and their party ids 
Formula: LET(query1,FILTER(A1:I1,C1="democratic"),UNIQUE(CHOOSECOLS(query1,5,6,1)))
Formula2: LET(query1,FILTER(A2:I8,C2:C8="democratic"),UNIQUE(CHOOSECOLS(query1,5,6,1)))
Level: hard
Question: What are the democratic lieutenant governors, comptrollers and their party ids?
Formula: LET(query1,FILTER(A1:I1,C1="democratic"),UNIQUE(CHOOSECOLS(query1,5,6,1)))
Formula2: LET(query1,FILTER(A2:I8,C2:C8="democratic"),UNIQUE(CHOOSECOLS(query1,5,6,1)))
Level: hard
Question: years that eliot spitzer governed
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:I1,D1="eliot spitzer"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:I8,D2:D8="eliot spitzer"),2))
Level: medium
Question: show ids and names of all parties with at least 2 records
Formula: LET(query1,SUMMARIZE(HSTACK(C1,A1),SUMX(I1)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Formula2: LET(query1,SUMMARIZE(HSTACK(C2:C8,A2:A8),SUMX(I2:I8)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Level: hard
Question: ids of parties with 2 or more records
Formula: LET(query1,SUMMARIZE(A1,SUMX(I1)),FILTER(query1,CHOOSECOLS(query1,2)>=2))
Formula2: LET(query1,SUMMARIZE(A2:A8,SUMX(I2:I8)),FILTER(query1,CHOOSECOLS(query1,2)>=2))
Level: hard
Question: How many governors?
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D8))
Level: easy
Question: What's the number of governors?
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D8))
Level: easy
Question: the democratic lieutenant governors, comptrollers and their party ids.
Formula: LET(query1,FILTER(A1:I1,C1="democratic"),UNIQUE(CHOOSECOLS(query1,5,6,1)))
Formula2: LET(query1,FILTER(A2:I8,C2:C8="democratic"),UNIQUE(CHOOSECOLS(query1,5,6,1)))
Level: hard
Question: the year governed by eliot spitzer.
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:I1,D1="eliot spitzer"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:I8,D2:D8="eliot spitzer"),2))
Level: medium
Question: the id and name of the party with at least 2 records
Formula: LET(query1,SUMMARIZE(HSTACK(C1,A1),SUMX(I1)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Formula2: LET(query1,SUMMARIZE(HSTACK(C2:C8,A2:A8),SUMX(I2:I8)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Level: hard
Question: the id of party having at least 2 records
Formula: LET(query1,SUMMARIZE(A1,SUMX(I1)),FILTER(query1,CHOOSECOLS(query1,2)>=2))
Formula2: LET(query1,SUMMARIZE(A2:A8,SUMX(I2:I8)),FILTER(query1,CHOOSECOLS(query1,2)>=2))
Level: hard