Lab Activity Today
Lab Activity Today
Mathemati
1 John 85 3
cs
2 Jane English 90 2
Mathemati
3 Mary 78 3
cs
4 Peter Science 88 4
Mathemati
5 David 92 3
cs
6 Susan English 85 2
Rober
7 Science 80 4
t
Emm
8 English 75 2
a
Problems:
1. Write a query to find the average grade of students in each course. Display
the course name as "Course" and the average grade as "Average Grade".
2. Write a query to calculate the total credits for each course. Display the course
as "Course" and the total credits as "Total Credits".
3. Write a query to find the unique courses offered to students. Display the
course name as "Course Name".
4. Write a query to find the total number of credits and average grade for all
courses. Display the total as "Total Credits" and the average as "Average
Grade".
5. Write a query to find the average grade of students in each course. Limit the
result to the top 2 courses based on average grade. Display the course as
"Course" and the average grade as "Average Grade".