CREATE TABLE table_name_39 (elected INT, party VARCHAR, district VARCHAR)

Party of republican, and a District of 5th is what highest elected?
SELECT MAX(elected) FROM table_name_39 WHERE party = "republican" AND district = "5th"
SELECT MAX("elected") FROM "table_name_39" WHERE "5th" = "district" AND "party" = "republican"