0% found this document useful (0 votes)
20 views1 page

Lab Activity Today

Uploaded by

desirecutepol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

Lab Activity Today

Uploaded by

desirecutepol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Table Data:

student_ nam grad credit


Course
id e e s

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".

You might also like