CREATE TABLE representative (Representative_ID VARCHAR, Party VARCHAR)
CREATE TABLE election (Votes INT, Representative_ID VARCHAR)

What is the average number of votes of representatives from party 'Republican'?
SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = "Republican"
SELECT AVG("T1"."Votes") FROM "election" AS "T1" JOIN "representative" AS "T2" ON "Republican" = "T2"."Party" AND "T1"."Representative_ID" = "T2"."Representative_ID"