From the course: SQL for Finance Professionals

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

How to use functions to perform calculations

How to use functions to perform calculations - SQL Tutorial

From the course: SQL for Finance Professionals

How to use functions to perform calculations

- [Instructor] Let's talk about SQL functions. Fortunately, SQL has a lot of built-in functions that allow you to perform the most common types of calculations on your data. The two types of functions in SQL are aggregate functions, which return a single value calculated from multiple values in a column, and scalar functions, which return a one-to-one output for each input value. Aggregate functions include functions to calculate the average, median, count, maximum, minimum, sum, first, and last of a set of data. These return basic statistics on a group of records when you specify a column name within the parentheses of the functions. When you see these parentheses, you know you're dealing with a function. And you can think of these parentheses as the word of. For example, when you see average, open close parentheses, think of average of a given group of records. Scalar functions, on the other hand, are used on…

Contents