Table:
0
A
B
C
D
E
F
1
District
Incumbent
Party
First elected
Result
Candidates
2
Pennsylvania 4 Plural district with 2 seats
Robert Whitehill
Democratic-Republican
1805 (special)
Re-elected
David Bard (DR) 50.0% Robert Whitehill (DR) 50.0%
3
Pennsylvania 4 Plural district with 2 seats
David Bard
Democratic-Republican
1802
Re-elected
David Bard (DR) 50.0% Robert Whitehill (DR) 50.0%
4
Pennsylvania 5
George Smith
Democratic-Republican
1808
Re-elected
George Smith (DR) 100%
5
Pennsylvania 6
William Crawford
Democratic-Republican
1808
Re-elected
William Crawford (DR) 56.6% David Cassat (F) 43.4%
6
Pennsylvania 7
John Rea
Democratic-Republican
1802
Lost re-election Democratic-Republican hold
William Piper (DR) 58.5% John Rea (DR) 41.5%
7
Pennsylvania 9
John Smilie
Democratic-Republican
1792 1798
Re-elected
John Smilie (DR) 100%

Questions and formulas:
Question: What district had an election with incumbent john smilie?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,B1="John Smilie"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F7,B2:B7="John Smilie"),1))
Level: medium
Question: How many districts first elected someone in 1808 and had george smith as the incumbent?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,(D1=1808)*(B1="George Smith")),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F7,(D2:D7=1808)*(B2:B7="George Smith")),1))
Level: medium