Table: election_results_1818
Columns: district
incumbent
party
first_elected
result
candidates

Question: Who are the candidates when the incumbent is john pegram?
SQL: SELECT "candidates" FROM election_results_1818 WHERE "incumbent" = 'John Pegram'

Question: Who are the candidates for district virginia 12?
SQL: SELECT "candidates" FROM election_results_1818 WHERE "district" = 'Virginia 12'

Question: What is the result when the candidates are alexander smyth (dr) 100%
SQL: SELECT "result" FROM election_results_1818 WHERE "candidates" = 'Alexander Smyth (DR) 100%'

Question: How many times is the candidates charles f. mercer (f) 100%?
SQL: SELECT COUNT("incumbent") FROM election_results_1818 WHERE "candidates" = 'Charles F. Mercer (F) 100%'