Advertisements
Advertisements
Question
Assertion (A): COUNf function ignores DISTINCT
Reason (R): DISTINCT ignores the duplicate values.
Options
Both A and R are true and R is the correct explanation for A.
Both A and R are true and R is not correct explanation for A.
A is true but R is false.
A is false but R is true.
MCQ
Solution
A is false but R is true.
Explanation:
DISTINCT when given with COUNT, evaluates the expression for each row in a group, and returns the number of unique, nonnull values.
shaalaa.com
Functions in SQL
Is there an error in this question or solution?