Hi - Can you tell me which department has the most students?
select t2.dept_name from student as t1 join department as t2 on t1.dept_code = t2.dept_code group by t1.dept_code order by count ( * ) desc limit 1
How many students are in the Accounting department?
select count ( * ) from student as t1 join department as t2 on t1.dept_code = t2.dept_code group by t1.dept_code order by count ( * ) desc limit 1
Please tell me the address of the Accounting department.
select dept_address from department where dept_name = "Accounting"
Great - can you tell me the names of students in the Accounting department with a GPA above 3.0?
select t2.stu_fname, t2.stu_lname from department as t1 join student as t2 on t1.dept_code = t2.dept_code where t1.dept_name = "Accounting" and t2.stu_gpa > 3.0
What is the total number of transfer students in all departments?
select sum ( stu_transfer ) from student