What is the first and last name of all students 18 years old who have vice president votes?
select distinct t1.fname, t1.lname from student as t1 join voting_record as t2 on t1.stuid = t2.vice_president_vote where t1.age = 18
Ok, what is the first and last name of the student who has president votes?
select distinct t1.fname, t1.lname from student as t1 join voting_record as t2 on t1.stuid = t2.president_vote
Ok, and of the students who had President votes how many were males?
select distinct count ( * ) from student as t1 join voting_record as t2 on t1.stuid = t2.president_vote where t1.sex = "M"