0
I’m using postgresql to do the select
of an attribute called val_unit
of a name table produto
.
I use having avg(val_unit) > val_unit
or where avg(val_unit)
to select only the val_unit
that stays within the average of everyone, but just doesn’t give.
Mine select
s:
select descricao_produto from produto where val_unit < avg(val_unit);
select descricao_produto form produto having val_unit < avg(val_unit);
Explain the meaning of "simply does not give", if possible give an example with the result obtained and the desired.
– anonimo
Missing group to be able to calculate the average
– bfavaretto
In thesis .... select descricao_product from product Where val_unit < (select avg(val_unit) from product) ... the below average
– Motta