SQL如下所示 方案1:where做表连接 SELECTa.SID, a.Sname,COUNT(b.CID) 选课总数,SUM(score) 总成绩 FROMStudent a , SC b WHEREa.SID=b.SID GROUPBYa.SID,a.Sname ORDERBYa.SID; 方案2:左外连接查询 SELECTstu.`SID`, stu.`Sname`,COUNT(sc.`CID`) 选课总数,SUM(sc.`score`) 总成绩 FROMStuden...