CREATE TABLE restaurant (resid DECIMAL, resname TEXT, address TEXT, rating DECIMAL)
CREATE TABLE restaurant_type (restypeid DECIMAL, restypename TEXT, restypedescription TEXT)
CREATE TABLE type_of_restaurant (resid DECIMAL, restypeid DECIMAL)
CREATE TABLE visits_restaurant (stuid DECIMAL, resid DECIMAL, time TIME, spent DECIMAL)
CREATE TABLE student (stuid DECIMAL, lname TEXT, fname TEXT, age DECIMAL, sex TEXT, major DECIMAL, advisor DECIMAL, city_code TEXT)

Which major has between 2 and 30 number of students? List major and the number of students.
SELECT major, COUNT(*) FROM student GROUP BY major HAVING COUNT(major) BETWEEN 2 AND 30
SELECT "major", COUNT(*) FROM "student" GROUP BY "major" HAVING COUNT("major") BETWEEN 2 AND 30