From the course: PostgreSQL: Advanced Queries
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Calculate the median value of a dataset - PostgreSQL Tutorial
From the course: PostgreSQL: Advanced Queries
Calculate the median value of a dataset
- [Instructor] In statistics, there are multiple ways to evaluate a dataset and determine the average value or what's more specifically called the central tendency. You may know these by the terms mean, median, mode, and range. Each one describes the central value in the set in a slightly different way and each one can be useful in different types of analyses. Now we've already talked about the mean of a dataset. That's the traditional average where you add up all of the values and then divide by the number of data points. PostgreSQL handles this with the AVG function that we've used with groups and window functions. So this chapter is going to focus on the other three measurements of central tendency starting with median. The median of a dataset can be found by sorting all of the numeric values from low to high and then finding the value that occurs at the midpoint of the list. To explore this, let's return to 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
-
-
-
-
-
(Locked)
Calculate the median value of a dataset6m 25s
-
(Locked)
Calculate the first and third quartiles of a dataset5m 47s
-
(Locked)
Find the most frequent value within a dataset with MODE2m 57s
-
(Locked)
Determine the range of values within a dataset2m 13s
-
(Locked)
Solution: Retrieve statistics of a dataset with groups4m 57s
-
(Locked)
-
-
-
-