What happens with NULL in GROUP BY and in aggregates?
Model answer
NULL values are grouped together as one group. Aggregates such as SUM and AVG skip NULLs, so AVG of (10, NULL, 20) is 15, not 10. Use COALESCE if you want NULL treated as zero.
Learn this topic
GROUP BY and HAVING: Summaries for Each Group in the course SQL for Beginners: Learn Databases Step by Step.
Sign in to add your own answer.