I am doing a query in my database to calculate an average and I use the avg()
. My problem is that it returns a lot of numbers after the comma, how can I reduce this to just one or two values after the comma?
I am doing a query in my database to calculate an average and I use the avg()
. My problem is that it returns a lot of numbers after the comma, how can I reduce this to just one or two values after the comma?
Hello, good night, it's so simple, doing it this way
SELECT round(avg(id_usuario),2) from principal.usuario as promedio
, the round clause is used, which is passed a value to round the result, in this case, this sentence will return two numbers after the comma, I hope it works for you, good night.Hey, I think if you give SELECT round(avg(id_user),2) from principal.user as average, the round clause is used, which is passed a value to round the result. In this case this statement will return two numbers after the comma. That's all I have/: