Task: Text to Code
Input (English): Step 1: For each row in representative table, find the corresponding rows in election table.
Step 2: find the average Vote_Percent in the results of step 1 whose Party equals Republican
Output (English): SELECT Avg ( T1.Vote_Percent ) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = "Republican"