OCP 1Z0 051 QUESTION NO: 40
来源:互联网 发布:陌陌加人软件 编辑:程序博客网 时间:2024/06/16 08:15
QUESTION NO: 40
Which two are true about aggregate functions? (Choose two.)
A. You can use aggregate functions in any clause of a SELECT statement.
B. You can use aggregate functions only in the column list of the select clause and in the WHERE
clause of a SELECT statement.
C. You can mix single row columns with aggregate functions in the column list of a SELECT
statement by grouping on the single row columns.
D. You can pass column names, expressions, constants, or functions as parameter to an
aggregate function.
E. You can use aggregate functions on a table, only by grouping the whole table as one single
group.
F. You cannot group the rows of a table by more than one column while using aggregate
functions.
A B
select、having与order by子句中可以用聚合函数
where 子句中不能使用聚合函数
C 见前面举例
D
E 见前面举例
F
Which two are true about aggregate functions? (Choose two.)
A. You can use aggregate functions in any clause of a SELECT statement.
B. You can use aggregate functions only in the column list of the select clause and in the WHERE
clause of a SELECT statement.
C. You can mix single row columns with aggregate functions in the column list of a SELECT
statement by grouping on the single row columns.
D. You can pass column names, expressions, constants, or functions as parameter to an
aggregate function.
E. You can use aggregate functions on a table, only by grouping the whole table as one single
group.
F. You cannot group the rows of a table by more than one column while using aggregate
functions.
A B
select、having与order by子句中可以用聚合函数
SQL> SELECT deptno, SUM(sal) AS s_sal 2 FROM emp 3 GROUP BY deptno 4 HAVING SUM(sal) > 9000 5 ORDER BY COUNT(*); DEPTNO S_SAL---------- ---------- 20 10875 30 94002 rows selected
where 子句中不能使用聚合函数
SQL> SELECT deptno, SUM(sal) AS s_sal 2 FROM emp 3 WHERE SUM(sal) > 9000 4 GROUP BY deptno;SELECT deptno, SUM(sal) AS s_sal FROM emp WHERE SUM(sal) > 9000 GROUP BY deptnoORA-00934: group function is not allowed here
C 见前面举例
D
SQL> SELECT deptno, 2 SUM(sal) AS colname, 3 SUM(sin(sal)) AS fun, 4 SUM(1) AS cons, 5 SUM(sal + 10) AS exp 6 FROM emp 7 GROUP BY deptno; DEPTNO COLNAME FUN CONS EXP---------- ---------- ---------- ---------- ---------- 30 9400 -2.0869580 6 9460 20 10875 1.84874246 5 10925 10 8750 -1.9964714 3 87803 rows selected
E 见前面举例
F
SQL> SELECT deptno, SUM(sal) AS sal, SUM(comm) AS comm FROM emp GROUP BY deptno; DEPTNO SAL COMM---------- ---------- ---------- 30 9400 2200 20 10875 10 8750 3 rows selected
答案错误,A不对
0 0
- OCP 1Z0 051 QUESTION NO: 40
- OCP 1Z0 051 QUESTION NO: 1
- OCP 1Z0 051 QUESTION NO: 2
- OCP 1Z0 051 QUESTION NO: 3
- OCP 1Z0 051 QUESTION NO: 4
- OCP 1Z0 051 QUESTION NO: 5
- OCP 1Z0 051 QUESTION NO: 6
- OCP 1Z0 051 QUESTION NO: 7
- OCP 1Z0 051 QUESTION NO: 8
- OCP 1Z0 051 QUESTION NO: 9
- OCP 1Z0 051 QUESTION NO: 10
- OCP 1Z0 051 QUESTION NO: 11
- OCP 1Z0 051 QUESTION NO: 12
- OCP 1Z0 051 QUESTION NO: 13
- OCP 1Z0 051 QUESTION NO: 14
- OCP 1Z0 051 QUESTION NO: 15
- OCP 1Z0 051 QUESTION NO: 16
- OCP 1Z0 051 QUESTION NO: 17
- 伪静态和真静态
- 主宰全球的10大算法
- IOS中发布应用程序,进度条一直不走怎么处理
- csdn code帮助文档地址
- android-aidl
- OCP 1Z0 051 QUESTION NO: 40
- 信息学习17
- Makefile经典教程
- 工厂模式
- matlab中color
- Indexing cannot yield&…
- Matlab中的rectangle函数
- 如何在mysql中查询每个分组的前几名
- Meshgrid命令详解