Help! I have a table looks like the following one.
SELECT *
FROM tblshipline
WHERE MethodShipped = 'FEDEX'
Then I get
Qtyshipped
2
3
15
3
10
9
10
Now the question is to calculate the AVERAGE of qtyshipped
and round it to 2 decimal number.
My Code is
SELECT CONVERT(decimal(8,6), ROUND(AVG(Qtyshipped),2))
FROM TblShipLine
WHERE MethodShipped= 'FEDEX'
The Answer should be 7.430000
,
But it always returns 7.000000
. I appreciate any advice, thanks!