A: SELECT* FROM student ORDER BY score ;
B: SELECT* FROM student ORDER BY score ASC ;
C: SELECT * FROM student ORDER BY score DESC ;
D: SELECT* FROM student GROUP BY score DESC ;
举一反三
- 从student表中查询学生姓名、年龄和成绩,结果按照年龄降序排序,年龄相同的按照成绩升序排序,下面SQL语句正确的是: A: select name, age, score from student order by age desc , score; B: select name, age, score from student order by age , score asc; C: select name, age, score from student order by 2 desc , 3 asc; D: select name, age, score from student order by 1 desc , 2;
- 查询学生成绩,将成绩首先按英语,然后按数学从高到低排序,正确的语句是( )。 A: select * from score order by english asc,maths asc B: select * from score order by english desc,maths desc C: select * from score order by maths,english D: select * from score order by english,maths
- 下列选项中,用于将 student 表按照 gender 字段进行分组查询,并且查询 score 字段值之和小于300的分组的 SQL 语句是 A: SELECT gender , SUM ( score ) FROM student GROUP BY gender HAVING SUM ( score )<;300; B: SELECT gender , SUM ( score ) FROM student GROUP BY gender WHERE SUM ( score )300; C: SELECT gender , SUM ( score ) FROM student WHERE SUM ( score )<;300 GROUP BY gender ; D: 以上语句都不对
- 在SCORE表中,按成绩升序排列存入NEW表中,应使用的SQL语句是( ). A: SELECT * FROM SCORE ORDER BY 成绩 B: SELECT * FROM SCORE ORDER BY 成绩 INTO TABLE NEW C: SELECT * FROM SCORE ORDER BY 成绩 TO NEW D: SELECT * FROM SCORE ORDER BY 成绩 INTO CURSOR NEW
- 在SCORE表中,按成绩升序排列存入NEW表中,应使用的SQL语句是 A: SELECT * FROM SCORE ORDER BY 成绩 INTO NEW B: SELECT * FROM SCORE ORDER BY 成绩 INTO CURSOR NEW C: SELECT * FROM SCORE ORDER BY 成绩 INTO TABLE NEW D: SELECT * FROM SCORE ORDER BY 成绩 TO NEW
内容
- 0
已知学生表student(sid,sname,sex,age0,其各个属性分别表示学号、姓名、性别和年龄,若要从表中检索所有学生的信息,检索结果按年龄由大到小排序,下列SQL语句正确的是( ) A: select * from student order by age B: select * from student group by age C: select * from student order by age desc D: select * from student group by age desc
- 1
A.SELECT Cno, AVG(Score) FROM SCS GROUP BY Score ORDER BY 2, Cno Desc B.SELECT Cno, AVG(Score) FROM SCS GROUP BY Cno ORDER BY 2, Cno Desc C.SELECT Cno, AVG(Score) FROM SCS WHERE Cno, Desc GROUP BY Score D.SELECT Cno, AVG(Score) FROM SCS GROUP BY, AVG(Score) ORDER BY, Cno Desc
- 2
若要将STUDENT表中的成绩在600分以上的学生姓名和成绩按成绩由高到低的顺序显示出来,应使用的SQL语句为( )。 A: SELECT 姓名,成绩 FROM STUDENT WHERE 成绩>=600 ORDER BY 成绩 B: SELECT 姓名,成绩 FROM STUDENT WHERE 成绩>=600 ORDER BY 成绩 ASC C: SELECT 姓名,成绩 FROM STUDENT WHERE 成绩>=600 ORDER BY 成绩 DESC D: SELECT 姓名,成绩 FROM STUDENT WHERE 成绩>=600 ORDER BY 成绩/D
- 3
若要将STUDENT表中的成绩在600分以上的学生姓名和成绩按成绩由高到低的顺序显示出来,应使用的SQL语句为( )。 A: SELECT 姓名,成绩 FROM STUDENT WHERE 成绩>=600 ORDER BY 成绩 B: SELECT 姓名,成绩 FROM STUDENT WHERE 成绩>=600 ORDER BY 成绩 ASC C: SELECT 姓名,成绩 FROM STUDENT WHERE 成绩>=600 ORDER BY 成绩 DESC D: SELECT 姓名,成绩 FROM STUDENT WHERE 成绩>=600 ORDER BY 成绩/D
- 4
按照学号进行分组,统计学生的平均成绩,且平均分按降序排列 A: select sid, avg(grade) from sc group by sid order by avg(grade) desc B: select sid, avg(grade) from sc group by cid order by avg(grade) desc C: select sid, avg(grade) from student group by sid order by avg(grade) desc D: select sid, avg(grade) from student group by cid order by avg(grade)