Correct option is B
The
AVG() function is an aggregate function in SQL. It calculates the average value of a numeric column, ignoring NULL values. Aggregate functions process multiple rows and return a single result.
Important Key Points:
1.
Definition of Aggregate Functions: Aggregate functions perform operations on a set of rows and return a single value. Examples include:
· SUM(): Calculates the total.
· AVG(): Calculates the average.
· COUNT(): Counts the rows.
· MIN() and MAX(): Find the smallest or largest value.
2.
Usage of AVG(): Syntax for using AVG() in SQL:
SELECT AVG(column_name) FROM table_name;
Knowledge Booster:
·
CONCAT(): Used for concatenating strings, not an aggregate function.
·
SUBSTRING(): Extracts a portion of a string; it operates on a single row and is not an aggregate function.
·
LENGTH(): Returns the length of a string in characters; not an aggregate function.
·
NOW(): A date-time function that returns the current timestamp; not an aggregate function.