108. Which two statements are true regarding the COUNT function? (Choose two.)
A. The COUNT function can be used only for CHAR, VARCHAR2, and NUMBER data types.
B. COUNT(*) returns the number of rows including duplicate rows and rows containing NULL value in
any of the columns.
C. COUNT(cust_id) returns the number of rows including rows with duplicate customer IDs and NULL
value in the CUST_ID column.
D. COUNT(DISTINCT inv_amt)returns the number of rows excluding排除在外 rows containing duplicates and
NULL values in the INV_AMT column.
E. A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a
WHERE clause.
![](https://i-blog.csdnimg.cn/blog_migrate/23657bd17555101fdd5660525aff8c69.png)
COUNT
returns the number of rows returned by the query. You can use it as an aggregate or analytic function.你可以用它作为一个聚合函数或解析函数
If you specify DISTINCT
, then you can specify only the query_partition_clause
of theanalytic_clause
. Theorder_by_clause
andwindowing_clause
are not allowed.
If you specify expr
, then COUNT
returns the number of rows whereexpr
is not null. You can count either all rows, or only distinct values ofexpr
.
If you specify the asterisk (*), then this function returns all rows, including duplicates and nulls. COUNT
never returns null.
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow