From the course: PostgreSQL: Advanced Queries
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Find the standard deviation and variance of a dataset - PostgreSQL Tutorial
From the course: PostgreSQL: Advanced Queries
Find the standard deviation and variance of a dataset
- [Instructor] In statistical analysis, scientific measurements, two additional aggregate functions may be valuable. The standard deviation and variance of a set of data, both describe the spread or the dispersion of values from the norm. Now, these types of statistical computations aren't typically used with retail data. So in order to demonstrate, I want to load in another dataset into the PostgreSQL database. In the chapter one folder of the exercise files, you'll find a file called people_heights.txt. Copy of the text into a new query window like I have here. And you'll see that it creates a table and it inserts a number of data rows into that table. Execute the script. And it'll create that table inside of the public schema. And it'll add 400 measurements of people's heights, accompanied by their name, and biological gender. Now, we have a good set of data values to evaluate with the standard deviation and the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Using GROUP BY to aggregate data rows7m 9s
-
(Locked)
Obtain general-purpose aggregate statistics5m 16s
-
(Locked)
Evaluate columns with Boolean aggregates4m 37s
-
(Locked)
Find the standard deviation and variance of a dataset5m 18s
-
Include overall aggregates with ROLLUP4m 14s
-
Return all possible combinations of groups with CUBE3m 38s
-
(Locked)
Segmenting groups with aggregate filters4m 57s
-
(Locked)
Solution: Group statistics with filters5m 7s
-
-
-
-
-
-
-