Database: cs_semester
Question: Among the students with a gpa of 3.1 to 3.7, how many of them are undergraduate students?
SQL: SELECT COUNT(student_id) FROM student WHERE gpa BETWEEN 3.1 AND 3.7 AND type = 'UG'