1
SQLBeginner#nulls
COUNT, SUM, AVG, MIN and MAX collapse many rows into one value. All of them ignore NULLs; COUNT(*) counts rows while COUNT(col) counts non-NULL values, and AVG divides by the non-NULL count.
-- salaries: 100, NULL, 200 SELECT COUNT(*), COUNT(salary), AVG(salary) FROM employees; -- 3, 2, 150