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

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" AS "T1" JOIN "voting_record" AS "T2" ON "Spring" = "T2"."election_cycle" AND "T1"."stuid" = "secretary_vote" WHERE "NYC" = "T1"."city_code"