Hello. I need to present the average cost, the lowest cost and the highest cost of all products and still present the total of products checked. The table I have is this:
Does anyone know how I generate this?
select max(custoun) as maior_custo_unitario,
avg(custoun) as custo_unitario_medio,
min(custoun) as menor_custo_unitario,
count(codprod) as qtde_total_produtos
from nome_tabela