-3
Good Afternoon! I need to calculate the average of this calculated column.
SELECT
RESUMO.CODCOLIGADA,
RESUMO.ID_CCUSTO,
RESUMO.CODCCUSTO,
RESUMO.NOME,
RESUMO.DTBAIXA,
SUM (RECEITAS) AS RECEITAS,
SUM(CUSTO) AS CUSTO,
***SUM (RECEITAS) + SUM(CUSTO) + SUM(IMPOSTOVENDAS) AS 'RESULTADO OPR' ,***
calculate the average for that column OPR RESULT Thank you all.
Have you tried
AVG(RECEITAS + CUSTO + IMPOSTOVENDAS)
?– anonimo
The average is relative to what ? The Group by ? line in sql AVG provides the average but at least for me the question was not clear.
– Motta