O'Reilly logo

Greenplum - Architecture and SQL by Leona Coffing, Tom Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 26 – Statistical Aggregate Functions

"You can make more friends in two months by becoming interested in other people than you will in two years by trying to get other people interested in you."

- Dale Carnegie

The Stats Table

image

Above is the Stats table. This will be used for our statistical examples.

The STDDEV_POP Function

Col1 Numbers

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 

Syntax for using STDDEV_POP:

STDDEV_POP(<column-name>)

SELECT STDDEV_POP(col1) AS SDPCol1FROM Stats_Table;

SDPCol1                     

8.6554414483991899

The standard deviation function is a statistical measure of spread ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required