postgresql si null alors 0
select coalesce(avg(bar), 0) from foo;
GutoTrosla
select coalesce(avg(bar), 0) from foo;