Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How get correct Standard Deviation / Variance

Cac47Apr 27 2016 — edited Apr 27 2016

Hi Gurus,

I've this Table cA

    

ID_PRDPRD_NAMEID_ASSESRESULT
1Structure16
1Structure25
1Structure36
2Forme18
2Forme21
2Forme310
3Oragnize13
3Oragnize23
3Oragnize30
4Online16
4Online26
4Online36

I need to get the Variancde and / or Standard Deviation for "Result" group by ID_PRD

I mean, I would like to have something like this (Sorrythis values are aproximatif, I'vent done the exact calculs)

ID_PRD   STDDEVI

1               0.2 

2               0.9

3               0.9

4                0

Beacuse the STD DEVIATION For ID_PRD 4 is Zero, the variance between the values is null right?

But when I run the query suggest by Oracle 

SELECTID_PRD,STDDEV(resultat) OVER (ORDER BY id_tp,id_asses) "StdDev"

from ASSES

i get quite different values


Does someone can Help?

Thxs in advance

This post has been answered by John Stegeman on Apr 27 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2016
Added on Apr 27 2016
16 comments
2,359 views