-- Calculate the average price, treating NULL as 0
SELECT AVG(COALESCE(price, 0)) AS average_price FROM products;
When using aggregate functions, NULL values are ignored. However, you can use COALESCE to include them in calculations.