Table:
0
A
B
C
D
E
1
Name
Residence
Party
Years in Assembly
Years in Senate
2
Mark Leno
San Francisco
Democratic
2002–2008
2008–present
3
Cathleen Galgiani
Livingston
Democratic
2006–2012 Galgiani came out in November 2011
2012–present
4
Tom Ammiano
San Francisco
Democratic
2008–present
—
5
John Pérez
Los Angeles
Democratic
2008–present
—
6
Toni Atkins
San Diego
Democratic
2010–present
—
7
Rich Gordon
Menlo Park
Democratic
2010–present
—
8
Ricardo Lara
Bell Gardens
Democratic
2010–2012
2012–present
9
Susan Eggman
Stockton
Democratic
2012–present
—

Questions and formulas:
Question: Which Party has a Residence of san diego?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,B1="san diego"),3))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,B2:B9="san diego"),3))
Level: medium
Question: Which Years in Senate  has a Years in Assembly of 2010–present, and toni atkins?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,(D1="2010–present")*(A1="toni atkins")),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,(D2:D9="2010–present")*(A2:A9="toni atkins")),5))
Level: medium
Question: Which Party has Years in Senate of —, and  Years in Assembly of 2012–present?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,(E1="—")*(D1="2012–present")),3))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,(E2:E9="—")*(D2:D9="2012–present")),3))
Level: medium
Question: Show the Residence whose Name is rich gordon?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,A1="rich gordon"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,A2:A9="rich gordon"),2))
Level: medium
Question: Which Years in Assembly has a Name of toni atkins?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,A1="toni atkins"),4))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,A2:A9="toni atkins"),4))
Level: medium
Question: Which Party has Years in Assembly of 2008–present, and a Name of tom ammiano?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,(D1="2008–present")*(A1="tom ammiano")),3))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,(D2:D9="2008–present")*(A2:A9="tom ammiano")),3))
Level: medium