I have a database with a lot of numbers,
I try to get the average, that works but I get up to 8 digits behind the decimal point (mostly 0).
Code: Select all
SELECT avg(number) FROM table;
Code: Select all
SELECT avg(number) FROM table;
Code: Select all
SELECT ROUND( AVG(number) , 2 ) FROM table;
Code: Select all
SELECT ( AVG(number) AS DECIMAL(16, 2) )FROM table;