QuestionQ41Verified/Reporting Aggregated Data Using the Group FunctionsCopy linkReport a problemAsk AstroTutorSave questionWhich two statements about the COUNT function are true?Choose twoACOUNT(*) returns the number of rows in a table including duplicate rows and rows containing NULLs in any column.BIt can only be used for NUMBER data types.CCOUNT(DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULLs in the INV_AMT column.DCOUNT(inv_amt) returns the number of rows in a table including rows with NULL in the INV_AMT columnEA SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE clause.Show AnswerAnswerExplanationCOUNT(*) returns the count of all rows, including duplicate rows and rows containing null values. COUNT(DISTINCT inv_amt) counts each distinct non-null INV_AMT value once, excluding nulls and repeated values. COUNT is not limited to NUMBER data types, and a query using COUNT(DISTINCT ...) may include a WHERE clause.Learn moreOracle SQL Reference — COUNTShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion