Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Computing sum of squares
> Date: Tue, 30 Jan 1996 14:30:25 -0500
> From: AMY LEONE <AMY_LEONE_at_FMSO.NAVY.MIL>
> Subject: Computing sum of squares
>
> What is the best way to compute the sum of squares for a
> particular column over a group of rows? All answers
> appreciated.
>
> Amy
Try this....
SELECT SUM(POWER(col,2)) FROM table WHERE condition;
HTH Ravi Sunkara Received on Wed Jan 31 1996 - 12:47:20 CST