Code
Code
2. Retrieve a list of all students and the courses they are currently enrolled in, including course details.
SELECT studentid, firstname, lastname, advisorid FROM students WHERE advisorid IS NULL;
4. Identify the student(s) with the highest GPA and their academic records.
6. Determine which departments offer the most courses by counting the number of courses
offered in each department.
8. Find the student groups with the most members and list the group names and member counts.
10. Compute the average cost of meal plans for different student groups (e.g., freshmen, sophomores,
etc.).
11. Calculate the total tuition revenue generated by each academic department.
12. Find the number of available library resources and the number checked out by students.
13. Calculate the number of student visits to health services and their average visit duration.
14. List student achievements (awards, honors) and group them by the student's department.
16. Find the countries where students have studied abroad and the number of students in each country.
17. List the upcoming campus events and their details, sorted by date.
19. Identify faculty members who have expertise in specific research areas, based on their academic
records.
SELECT firstname, lastname FROM instructors WHERE hasexpertise = TRUE;
20. Analyze the historical enrollment data to identify trends in student enrollment over the past few
years.
21. Verify if students enrolling in advanced courses meet the prerequisites by checking their transcript
records.
22. List students with outstanding fees, including the total amount owed.
23. Identify instructors who are teaching multiple courses in the same term and list the courses
they are teaching.
24. Calculate statistics on student diversity, such as the distribution of gender, ethnicity, or nationality.
25. Find the most popular combinations of courses (sets of courses taken together) among students.
--
26. Compare the academic performance (GPA) of students based on their faculty advisors.
27. Identify student groups that have members from a wide range of majors, promoting
interdisciplinary collaboration.
28. List courses with consistently high enrollment, helping with scheduling and resource allocation.
29. Calculate the average time it takes students to graduate, considering their major and any changes in
degree programs.
30. Determine if students who complete internships have a higher graduation rate compared to those
who do not.