I have a select that returns the average of the columns. I used the Round to remove some decimal places and round the numbers.
The possible numbers of the fields are integers from 1 to 5, and when the average is selected, the decimals appear. But my need is for those decimals to be rounded to 0.5. Example: 1.0, 1.5, 2.0, 2.5, 3.0 etc.
My select is this:
SELECT
nomNome,
ROUND(((notaAmbiente +
notaApresentacaoDasPizzas +
notaQualidadeDosProdutos +
notaVariedadeDeSabores +
notaAtendimentoNaLoja +
notaAtendimentoNoTel +
notaAgilidadeNaEntrega +
notaCustoBeneficio +
notaPromocoes +
notaSite +
notaSatisfacao + notaSatisfacao) / 12), 1) AS notaOpiniao
FROM tbOpiniao
As it returns without the correct rounding: 3,2 (3,199) and 2,3 (2,277) How do I want it to return: 3.0 and 2.5
How to do this?