3 ms·
I'm not talking about HAVING, I'm talking about item #25: filter aggregate inputs. Queries like select sex, round( avg(body_mas
by mvdtnz 3y ago
I'm not talking about HAVING, I'm talking about item #25: filter aggregate inputs. Queries like
select
sex,
round(
avg(body_mass_g) filter (where body_mass_g < 4000.0),
1
) as average_mass_g
from penguins
group by sex;