From the course: SQL for Statistics Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Continuous percentiles

Continuous percentiles

- [Instructor] The discrete percentile function returns the value of the first value that exceeds the percentile in an ordered list of values. This function will always return a value that's in the dataset. Now, if you're more interested in knowing the boundaries of the percentile buckets, then the continuous percentile function can tell you that. The boundaries are equal size, and the values and the columns don't necessarily fall exactly on those boundaries. When that happens, the continuous percentile function interpolates the boundary value. Let's look at an example. Let's select the percentile, and instead of using discrete we use the continuous percentile, and let's work with a 95th percentile. And that's within the group that's specified by order by revenue. So this is similar to what we saw on the previous video, except now, we're using percentile continuous, instead of percentile discrete. So let's give this an alias. We'll call that percentile 95 continuous revenue. Let's…

Contents