The AVG function is used in SQL to return the average value of a numeric column.
It is useful for finding the mean value of data, such as average salary or average sales.
SELECT AVG(column_name)
FROM table_name
WHERE condition;
AVG(column_name) calculates the average of the values in the specified column.GROUP BY to find averages within different groups.SELECT AVG(salary)
FROM employees;
NULL values when calculating the average.GROUP BY to calculate averages per group.SELECT department, AVG(salary)
FROM employees
GROUP BY department;
Describe the problem, challenge, or topic discussed in a video related to SELECT FROM.
What concept was explained or what exercise was solved?
-- Write your SQL code attempt or solution related to SQL COMMAND
SQL COMMAND
SQL COMMAND
Explanation - Explain what you learned, any key takeaways, or how you solved the problem related to COMMAND._