Table:
0
A
B
C
D
E
F
1
District
Incumbent
Party
First elected
Result
Candidates
2
Massachusetts 1
John Olver
Democratic
1991
Re-elected
John Olver (D) 67.56% Matthew Kinnaman (R) 32.38%
3
Massachusetts 2
Richard Neal
Democratic
1988
Re-elected
Richard Neal (D) unopposed
4
Massachusetts 3
Jim McGovern
Democratic
1996
Re-elected
Jim McGovern (D) unopposed
5
Massachusetts 4
Barney Frank
Democratic
1980
Re-elected
Barney Frank (D) unopposed
6
Massachusetts 7
Ed Markey
Democratic
1976
Re-elected
Ed Markey (D) unopposed
7
Massachusetts 8
Mike Capuano
Democratic
1998
Re-elected
Mike Capuano (D) unopposed
8
Massachusetts 9
Stephen Lynch
Democratic
2001
Re-elected
Stephen Lynch (D) unopposed

Questions and formulas:
Question: Who were the candidates when ed markey was the incumbent?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,B1="Ed Markey"),6))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,B2:B8="Ed Markey"),6))
Level: medium
Question: How many times was the incumbent mike capuano
Formula: ROWS(UNIQUE(FILTER(E1, B1="Mike Capuano")))
Formula2: ROWS(UNIQUE(FILTER(E2:E8, B2:B8="Mike Capuano")))
Level: medium
Question: Who were the candidates when Barney Frank was the incumbent?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,B1="Barney Frank"),6))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,B2:B8="Barney Frank"),6))
Level: medium
Question: What was the earliest year someone was first elected from Massachusetts 3
Formula: MINIFS(D1,A1,"Massachusetts 3")
Formula2: MINIFS(D2:D8,A2:A8,"Massachusetts 3")
Level: easy