I can’t compare an arithmetic mean, so I can use select

Asked

Viewed 40 times

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 selects:

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.

  • 1

    Missing group to be able to calculate the average

  • 1

    In thesis .... select descricao_product from product Where val_unit < (select avg(val_unit) from product) ... the below average

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.