Avg in Sql - Float Number Problem
Select Avg(Variable) as Expr1, Sum(Variable) as Expr2 From. .. .. . Result for Avg Is 2, but It Is Not True, It Must Be 2.95. What Is the Problem, Any Idea? 1...
SELECT AVG(variable) AS Expr1, SUM(variable) AS Expr2
FROM ......
result for AVG is 2, but it is not true, it must be 2.95. What is the problem, any idea?
1 Answer
Try
Select
AVG(Cast(variable as Float)),
SUM(variable)
From
Table