How many students have president votes?
select count(distinct t1.stuid) from student as t1 join voting_record as t2 on t1.stuid = t2.president_vote
How many of those students have advisor 8741?
select count(distinct t1.stuid) from student as t1 join voting_record as t2 on t1.stuid = t2.president_vote where t1.advisor = "8741"
What are their names?
select distinct t1.fname, t1.lname from student as t1 join voting_record as t2 on t1.stuid = t2.president_vote where t1.advisor = "8741"
Please only list last names.
select distinct t1.lname from student as t1 join voting_record as t2 on t1.stuid = president_vote intersect select distinct lname from student where advisor = "8741"