查询平均成绩大于80分的课程的名字和学分.SQL语句查询,跪求高人指点!我积分不多,这次都悬赏出去了

2024-12-03 03:24:38
推荐回答(3个)
回答(1):

根睁敬据提示渗握来改,在GROUP BY后面加上Credit就OK 了
SELECT Cname 课丛早庆程名, Credit FROM SC JOIN Course ON SC.Cno = Course.Cno
GROUP BY Cname , Credit
HAVING AVG(grade)> 80

回答(2):

根据报错来改, 在GROUP BY后樱樱坦卜面加Credit就脊信丛🆗了
SELECT Cname 课程名, Credit FROM SC JOIN Course ON SC.Cno = Course.Cno
GROUP BY Cname , Credit
HAVING AVG(grade)> 80

回答(3):

连接是inner join on