Table: election_results_1882
Columns: district
incumbent
party
first_elected
result

Question: Which District has a Party of republican and a Result of lost re-election democratic gain?
SQL: SELECT "district" FROM election_results_1882 WHERE "party" = 'republican' AND "result" = 'lost re-election democratic gain'

Question: What is First elected that has republican Party and a Result of retired democratic gain?
SQL: SELECT "first_elected" FROM election_results_1882 WHERE "party" = 'republican' AND "result" = 'retired democratic gain'

Question: What is the First elected of california 3?
SQL: SELECT "first_elected" FROM election_results_1882 WHERE "district" = 'california 3'

Question: Which Incumbent has a Result of retired democratic gain?
SQL: SELECT "incumbent" FROM election_results_1882 WHERE "result" = 'retired democratic gain'

Question: Which First elected has a Incumbent of none (new seat)?
SQL: SELECT "first_elected" FROM election_results_1882 WHERE "incumbent" = 'none (new seat)'

Question: What is the First elected that has a republican party and california 4?
SQL: SELECT "first_elected" FROM election_results_1882 WHERE "party" = 'republican' AND "district" = 'california 4'