QuestionQ39Verified/Restricting and Sorting DataCopy linkReport a problemAsk AstroTutorSave questionWhich two statements about the WHERE and HAVING clauses in a SELECT statement are true?Choose twoAAggregating functions and columns used in HAVING clauses must be specified in the SELECT list of a queryBWHERE and HAVING clauses can be used in the same statement only if applied to different table columnsCThe HAVING clause can be used with aggregating functions in subqueriesDThe WHERE clause can be used to exclude rows before dividing them into groupsEThe WHERE clause can be used to exclude rows after dividing them into groupsShow AnswerAnswerExplanationWHERE filters individual rows before GROUP BY divides the remaining rows into groups. HAVING applies conditions to grouped results and supports aggregate expressions; it can also be used in subquery contexts. Aggregate expressions in a HAVING clause do not have to be included in the SELECT list.Learn moreOracle Database SQL Language Reference — SELECTOracle Database SQL Language Reference — Aggregate FunctionsShow comments2Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion