From the course: SQL Tips and Tricks for Data Science

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Aggregate data

Aggregate data - SQL Tutorial

From the course: SQL Tips and Tricks for Data Science

Start my 1-month free trial

Aggregate data

- [Instructor] Now let's take a look at aggregating data. So by aggregating data, we are using a collection of built-in functions in SQL that summarize or roll up our values. The basic examples we have are min, max, average, sum and count. And then there's some more analytical ones for standard deviation, variance, and rank. Now the most common ones are supported by nearly every database platform. And they're very simple and probably familiar, min and max find the minimum and the maximum value, average finds the average of your data. Sum sums 'em up, it adds 'em all together and count provides a count of things and there are different ways to actually enhance it. And let's say you wanted to see a count of distinct things. You can add some other logic to these to actually make them more advanced. On the analytical side, these are some statistical functions that are common there are, of course, many more. And I only…

Contents