user: Question: When was William Kennedy first elected?
Columns: ['District', 'Incumbent', 'Party', 'First elected', 'Result', 'Candidates']
Types: ['text', 'text', 'text', 'text', 'text', 'text']
Sample row: ['North Carolina 2', 'Willis Alston', 'Democratic-Republican', '1798', 'Re-elected', 'Willis Alston (DR) 65.9% Joseph H. Bryon (F) 34.1%']
SQL:

assistant: SELECT "First elected" FROM "Table" WHERE "Incumbent" = 'William Kennedy';