Invalid usage of aggregate function Mean() and Type: String
<p>My Code is</p>

<pre><code>DataTable dtNew = new DataTable();
object o2 = dtAll.Compute("MIN(Price)", string.Empty);
object o1 = dtAll.Compute("AVG(Price)",string.Empty);    
</code></pre>

<p>Min returns minimum.. thats work fine. but avg generates error</p>

<p>"Invalid usage of aggregate function Mean() and Type: String."</p>

<p>Datatype of Price Column in sql server is decimal.</p>
