Count the number of students whose city code is NYC.
select count(*) from student where city_code = "NYC"
How many have secretary votes?
select count(distinct t1.stuid) from student as t1 join voting_record as t2 on t1.stuid = secretary_vote where t1.city_code = "NYC"
Which of those students have votes from the spring election cycle? List their names.
select distinct t1.fname, t1.lname from student as t1 join voting_record as t2 on t1.stuid = secretary_vote where t1.city_code = "NYC" and t2.election_cycle = "Spring"
What is their average age?
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"