Table:
0
A
B
C
D
E
F
1
District
Incumbent
Party
First elected
Result
Candidates
2
Pennsylvania 8
Alexander Ogle
Democratic-Republican
1816
Retired Democratic-Republican hold
Robert Philson (DR) 59.6% John A. Bard (F) 40.4%
3
Pennsylvania 9
William P. Maclay
Democratic-Republican
1816
Re-elected
William P. Maclay (DR) 77.6% John Brown (DR) 22.4%
4
Pennsylvania 10 Plural district with 2 seats
William Wilson
Democratic-Republican
1814
Retired Democratic-Republican hold
John Murray (DR) 50.4% George Denison (DR) 49.6%
5
Pennsylvania 10 Plural district with 2 seats
John Murray
Democratic-Republican
1817 ( special )
Re-elected
John Murray (DR) 50.4% George Denison (DR) 49.6%
6
Pennsylvania 11
David Marchand
Democratic-Republican
1816
Re-elected
David Marchand (DR) 52.6% James Kelly (F) 47.4%
7
Pennsylvania 13
Christian Tarr
Democratic-Republican
1816
Re-elected
Christian Tarr (DR) 78.7% Henry Heaton (DR) 21.3%
8
Pennsylvania 14
Henry Baldwin
Democratic-Republican
1816
Re-elected
Henry Baldwin (DR) 55.1% Samuel Douglas (DR) 44.9%

Questions and formulas:
Question: Who were the incumbent(s) in the election featuring  john murray (dr) 50.4% george denison (dr) 49.6% with a result of a retired democratic-republican hold?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,(F1="John Murray (DR) 50.4% George Denison (DR) 49.6%")*(E1="Retired Democratic-Republican hold")),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,(F2:F8="John Murray (DR) 50.4% George Denison (DR) 49.6%")*(E2:E8="Retired Democratic-Republican hold")),2))
Level: medium
Question: Who were the incumbent(s) when the result was a retired democratic-republican hold and the first elected representative was in 1816>
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,(E1="Retired Democratic-Republican hold")*(D1=1816)),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,(E2:E8="Retired Democratic-Republican hold")*(D2:D8=1816)),2))
Level: medium
Question: Who were the candidates in the election where william wilson was the incumbent?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,B1="William Wilson"),6))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,B2:B8="William Wilson"),6))
Level: medium