CREATE TABLE voting_record (stuid NUMBER, registration_date CLOB, election_cycle CLOB, president_vote NUMBER, vice_president_vote NUMBER, secretary_vote NUMBER, treasurer_vote NUMBER, class_president_vote NUMBER, class_senator_vote NUMBER)
CREATE TABLE student (stuid NUMBER, lname CLOB, fname CLOB, age NUMBER, sex CLOB, major NUMBER, advisor NUMBER, city_code CLOB)

What is the average age of students who have city code 'NYC' and have secretary votes for the spring election cycle?
SELECT AVG(T1.age) FROM student AS T1 JOIN voting_record AS T2 ON T1.stuid = secretary_vote WHERE T1.city_code = "NYC" AND T2.election_cycle = "Spring"
SELECT AVG("T1"."age") FROM "student" "T1" JOIN "voting_record" "T2" ON "Spring" = "T2"."election_cycle" AND "T1"."stuid" = "secretary_vote" WHERE "NYC" = "T1"."city_code"