Table:
0
A
B
C
D
E
1
Name
Election Year
Party
Birth State
Resident State
2
James K. Polk
1844
Democrat
Lost North Carolina
Lost Tennessee
3
Zachary Taylor
1848
Whig
Lost Virginia
Won Louisiana
4
Abraham Lincoln
1860
Republican
Lost Kentucky
Won Illinois
5
Abraham Lincoln
1864
Republican
Lost Kentucky
Won Illinois
6
Woodrow Wilson
1916
Democratic
Won Virginia
Lost New Jersey
7
Richard Nixon
1968
Republican
Won California
Lost New York
8
George H. W. Bush
1988
Republican
Lost Massachusetts
Won Texas
9
George W. Bush
2000
Republican
Lost Connecticut
Won Texas
10
George W. Bush
2004
Republican
Lost Connecticut
Won Texas

Questions and formulas:
Question: What state was the president who was elected earlier than 1848 born in?
Formula: LET(query1,SUMMARIZE(D1,SUMX(B1)),FILTER(query1,CHOOSECOLS(query1,2)<1848))
Formula2: LET(query1,SUMMARIZE(D2:D10,SUMX(B2:B10)),FILTER(query1,CHOOSECOLS(query1,2)<1848))
Level: hard
Question: What is the resident state for the president elected in 1864?
Formula: LET(query1,SUMMARIZE(E1,SUMX(B1)),FILTER(query1,CHOOSECOLS(query1,2)=1864))
Formula2: LET(query1,SUMMARIZE(E2:E10,SUMX(B2:B10)),FILTER(query1,CHOOSECOLS(query1,2)=1864))
Level: hard
Question: What is the election year of the president with a Birth State of lost connecticut?
Formula: SUMIFS(B1,D1,"lost connecticut")
Formula2: SUMIFS(B2:B10,D2:D10,"lost connecticut")
Level: easy