Table: sf_bay_area_districts
Columns: district
location
representative
cook_pvi
2012_election_results
median_household_income_2011

Question: What is the location that has the 12th district?
SQL: SELECT "location" FROM sf_bay_area_districts WHERE "district" = '12th'

Question: How many election results in 2012 had a Cook PVI of D+16?
SQL: SELECT COUNT("2012_election_results") FROM sf_bay_area_districts WHERE "cook_pvi" = 'D+16'

Question: What is the Cook PVI for the location that has a representative of Mike Thompson?
SQL: SELECT "cook_pvi" FROM sf_bay_area_districts WHERE "representative" = 'Mike Thompson'

Question: How many locations have a median household income in 2011 of $71,479?
SQL: SELECT COUNT("location") FROM sf_bay_area_districts WHERE "median_household_income_2011" = '$71,479'

Question: What is the 2012 election results for locations whose representative is Barbara Lee?
SQL: SELECT "2012_election_results" FROM sf_bay_area_districts WHERE "representative" = 'Barbara Lee'