11 Statistical Functions in SQL

In this chapter, we’ll explore SQL statistical functions along with guidelines for using them. A SQL database usually isn’t the first tool a data analyst chooses when they need to do more than calculate sums and averages. Typically, the software of choice is a full-featured statistics package, such as SPSS or SAS, the programming languages R or Python, or even Excel. But you don’t have to discount your database. Standard ANSI SQL, including PostgreSQL’s implementation, offers powerful stats functions and capabilities that reveal a lot about your data without having to export your dataset to another program. ...

Get Practical SQL, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.