I need the code for these sql queries please Print the name(s) of student(s) wit
ID: 3823153 • Letter: I
Question
I need the code for these sql queries please
Print the name(s) of student(s) with the lowest gpa. select sname from student where gpa=(select min(gpa) from student); For each Computer Sciences class, print the cno, sectno, and the average gpa of the students enrolled in the class. select c.cno, c.cname, e.sectno, (select avg(gpa) from student where find_in_set(sid, group_concat(e.sid))) as avgGpa from course c left join enroll e using(cno) where c.dname= "Computer Sciences" group by cname, sectno;Explanation / Answer
1)
select sname, gpa from student where gpa in (select min(gpa) from student);
2)
select class.cno, class.cname, enroll.sectno,(select avg(gpa) from student where find_in_set (sid,group_concat(enroll.sid))) as avgGPA from course course left join enroll enroll using(eno) where
course.dname like 'ComputerScience' group by
cname, sectno;