mariadb lançou nulo para 0
SELECT COALESCE(col, 0) FROM `table`;
Matteoweb
SELECT COALESCE(col, 0) FROM `table`;