QuestionQ130Verified/Reporting Aggregated Data Using the Group FunctionsCopy linkReport a problemAsk AstroTutorSave questionWhich two statements are accurate about the COUNT function?Choose twoAThe count function can be used only for CHAR, VARCHAR2, and NUMBER data types.BCount (*) returns the number of rows including duplicate rows and rows containing null value in any of the columns.CCount (cust_id) returns the number of rows including rows with duplicate customer IDs and NULL value in the CUST_ID column.DCount (distinct inv_amt) returns the number of rows excluding rows containing duplicates and NULL values in the INV_AMT column.EA select statement using the COUNT function with a DISTINCT keyword cannot have a where clause.Show AnswerAnswerExplanationCOUNT(*) returns the total number of result rows, including duplicate rows and rows that contain NULLs. COUNT(DISTINCT inv_amt) counts only unique, non-NULL INV_AMT values. In contrast, COUNT(cust_id) excludes NULL CUST_ID values, and DISTINCT may be used in a query that also has a WHERE clause.Learn moreOracle Database SQL Language Reference — Aggregate FunctionsShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion