MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following group functions ignore NULL values?
A
MAX
B
COUNT
C
SUM
D
All of the above
Explanation: 

Detailed explanation-1: -Except COUNT function, all the group functions ignore NULL values.

Detailed explanation-2: -An aggregate function performs a calculation on a set of values, and returns a single value. Except for COUNT(*), aggregate functions ignore null values.

Detailed explanation-3: -MAX, COUNT, SUM are the group functions that ignore NULL values. When using group functions like MAX, COUNT, and SUM the set of rows that are grouped if it contains NULL values then also it will give us the result.

Detailed explanation-4: -Explanation: The count(*) aggregation function ignores null values while calculating the number of values in a particular attribute.

Detailed explanation-5: -COUNT(expression) returns the number of values in expression, which is a table column name or an expression that evaluates to a column of data. COUNT(expression) does not count NULL values. This query returns the number of non-NULL values in the Name column of Sample. Person.

There is 1 question to complete.