From the course: Advanced SQL for Data Scientists

Unlock the full course today

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

Extending SQL with user-defined functions

Extending SQL with user-defined functions

From the course: Advanced SQL for Data Scientists

Start my 1-month free trial

Extending SQL with user-defined functions

- [Instructor] Now we're going to shift our attention to extending SQL. And this is actually one of the more interesting topics with regards to advanced SQL, which is how do we get beyond what is given to us essentially in the box in the Postgres or whatever database we're using. How can we make it even more functional from a data science perspective? Well, the first thing to note is that of course, SQL provides many types of functions for operating on data and we use them all the time. But in terms of the universe of all possible functions we might need to work with from a data science perspective, what SQL provides is a small fraction. So there are many more functions we might want to be working with. So for example, SQL will provide aggregate functions for us, string manipulation functions, pattern matching, date/time, and geometric functions. And these are just a small number of examples. But we sometimes need custom…

Contents