A: SELECT sno FROM sc WHERE sname="数据库"AND grade=MAX(grade)
B: SELECT sno FROM sc FOR sname="数据库"OR grade>=MAX(grade)
C: SELECT sno FROM sc WHERE sname="数据库"AND grade=(SELECT MAX(grade)FROM sc)
D: SELECT sno FROM sc FOR sname="数据库"OR grade=(SELECT MAX(grade)FROM s
举一反三
- 已知关系模式:SC(sno,sname,grade),各属性含义依次为学号、课程名、分数。要查找“数据库”课分数最高的学生的学号,正确的SQL语句是( )。 A: SELECT sno FROM sc WHERE sname="数据库"AND grade=MAX(grade) B: SELECT sno FROM sc FOR sname="数据库"OR grade>=MAX(grade) C: SELECT sno FROM sc WHERE sname="数据库"AND grade=(SELECT MAX(grade)FROM sc) D: SELECT sno FROM sc FOR sname="数据库"OR grade=(SELECT MAX(grade)FROM s
- 已知关系模式:sc(sno,sname,grade),各属性含义依次为学号、课程名、分数。要查找“数据库”课分数最高的学生的学号,正确的SQL语句是( )。 A: SELECT sno FROM sc WHERE sname="数据库"AND grade=MAX(grad B: SELECT sno FROM sc FOR sname="数据库"OR grade>=MAX(grad C: SELECT sno FROM sc WHERE sname="数据库"AND grade=(SELECT MAX(grad FROM s D: SELECT sno FROM sc FOR sname="数据库"OR grade=(SELECT MAX(grad FROM s
- 已知关系模式:sc(sno,sname,grade),各属性含义依次为学号、课程名、分数。要查找“数据库”课分数最高的学生的学号,正确的SQL语句是()。 A: SELECT sno FROM SC. WHERE sname="数据库"AND. grade=MAX(grade) B: SELECT sno FROM SC. FOR sname="数据库"OR grade>MAX(grade) C: SELECT sno FROM SC. WHERE shame="数据库"AND. grade=(SELECT MAX(grade)FROM sc) D: SELECT son FROM SC. FOR sname="数据库"OR grade=(SELECT MAX(grade. FROM sc)
- 23~24 题基于以下说明。设有三个关系: 学生关系S(SNO,SNAME,AGE,SEX) (分别代表学生的学号、姓名、年龄、性别) 学习关系SC(SNO,CNO,GRADE) (分别代表学生的学号、课程编号、成绩) 课程关系C(CNO,CNAME,TEACHER) (分别代表课程的编号、课程名、任课教师) 已知关系模式:sc(sno,sname,grade),各属性含义依次为学号、课程名、分数。要查找“数据库”课分数最高的学生的学号,正确的SQL语句是 。 A: SELECT sno FROM sc WHERE sname="数据库"AND grade=MAX(grade) B: SELECT sno FROM sc FOR sname="数据库"OR grade>=MAX(grade) C: SELECT sno FROM sc WHERE sname="数据库"AND grade=(SELECT MAX (grade) FROM sc) D: SELECT sno FROM sc FOR sname="数据库" OR grade=(SELECT MAX (grade) FROM sc)
- 关系SC(Sno,Cno,Grade)表示学号,课程号,成绩。现要查询最高分在91分以上的学生的学号和平均成绩,正确的语句是______。 A: SELECT Sno,MAX(Grade) FROM SC WHERE MAX(Grade)>=91 GROUP BY Sno B: SELECT Sno,MAX(Grade) FROM SC GROUP RY Sno HAVING MAX(Grade)>=91 C: SELECT Sno,MAX(Grade) FROM SC WHERE MAX(Grade)>=91 ORDER BY Sno D: SELECT Sno,MAX(Grade) FROM SC GROUP BY Cno HAVING MAX(Grade)>=91
内容
- 0
有如下的SQL语句.Ⅰ. SELECT sname FROM s, sc WHERE gradeⅡ. SELECT sname FROM s WHERE sno IN(SELECT sno FROM sc WHERE gradeⅢ. SELECT sname FROM s, sc WHERE s.sno=sc.sno AND grade若要查找分数(grade)不及格的学生姓名(sname),则以上正确的有哪些?( ) 。 A: Ⅰ和Ⅱ B: Ⅰ和Ⅲ C: Ⅱ和Ⅲ D: Ⅰ、Ⅱ和Ⅲ
- 1
有如下的SQL语句:Ⅰ. SELECT sname FROM s, sc WHERE grade<;60Ⅱ. SELECT sname FROM s WHERE sno IN(SELECT sno FROM sc WHERE grade<;60)Ⅲ. SELECT sname FROM s, sc WHERE s.sno=sc.sno AND grade<;60若要查找分数(grade)不及格的学生姓名(sname),则以上正确的有哪些?() A: Ⅰ和Ⅱ B: Ⅰ和Ⅲ C: Ⅱ和Ⅲ D: Ⅰ、Ⅱ和Ⅲ
- 2
有关系S(S#,SNAME,SAGE),C(C#,CNAME),SC(S#,C#,GRADE)。若要查找分数(grade)不及格的学生姓名(sname),则以上正确的有?( ) A: SELECT sname FROM s, sc WHERE grade<60 B: SELECT sname FROM s WHERE sno IN(SELECT Cno FROM sc WHERE grade<60) C: SELECT sname FROM s, sc WHERE s.sno=sc.sno AND grade<60 D: SELECT sname FROM s, sc WHERE s.sno=sc.sno OR grade<60
- 3
关系SC(Sno,Cno,Grade)表示学号、课程号、成绩。现要查询最高分在91分以上的学生的学号和平均成绩,正确的语句是______。 A: SELECT Sno,MAX(Grade)<br> FROM SC<br> WHERE MAX(Grade)≥91<br> GROUP BY Sno B: SELECT Sno,MAX(Grade)<br> FROM SC<br> GROUP BY Sno<br> HAVING MAX(Grade)≥91 C: SELECT Sno,MAX(Grade)<br> FROM SC<br> WHERE MAX(Grade)≥91<br> ORDER BY Sno D: SELECT Sno,MAX(Grade)<br> FROM SC<br> GROUP BY Cno<br> HAVING MAX(Grade)≥91
- 4
针对表SC(sno, cno, grade),其中sno为学号,cno为课程号,grade为成绩。以下哪个操作( )统计出每位学生所选课程的最高分和最低分。 A: select sno,max(grade), min(grade) from sc B: select sno,max(grade), min(grade) from sc order by sno C: select sno,max(grade), min(grade) from sc group by sno D: select sno,avg(grade), sum(grade) from sc group by sno