Table: election_results_1834
Columns: district
incumbent
party
first_elected
result
candidates

Question: Who were the candidates in districk Pennsylvania 12?
SQL: SELECT "candidates" FROM election_results_1834 WHERE "district" = 'Pennsylvania 12'

Question: What is the result for district pennsylvania 6?
SQL: SELECT "result" FROM election_results_1834 WHERE "district" = 'Pennsylvania 6'

Question: Who was the incumbent when the candidates were John banks (am) 52.2% samuel power (j) 47.8%?
SQL: SELECT "incumbent" FROM election_results_1834 WHERE "candidates" = 'John Banks (AM) 52.2% Samuel Power (J) 47.8%'

Question: How many times was the result was re-elected and the party was anti-masonic in the district Pennsylvania 24?
SQL: SELECT COUNT("first_elected") FROM election_results_1834 WHERE "result" = 'Re-elected' AND "party" = 'Anti-Masonic' AND "district" = 'Pennsylvania 24'

Question: Who were all the candidates when the results were re-elected, first elected was 1832 and the party was jacksonian?
SQL: SELECT "candidates" FROM election_results_1834 WHERE "result" = 'Re-elected' AND "first_elected" = '1832' AND "party" = 'Jacksonian'