Database: voter_2

Question: Report all advisors that advise more than 2 students.
SQL: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*)  >  2

Question: Report all majors that have less than 3 students.
SQL: SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*)  <  3

Question: Which major has the most students?
SQL: SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1

Question: What is the most common major among female (sex is F) students?
SQL: SELECT Major FROM STUDENT WHERE Sex  =  "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1

Question: What is the city_code of the city that the most students live in?
SQL: SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1