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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Background and use cases of SQL57s
-
Types of SQL commands2m 13s
-
(Locked)
SQL data types2m 18s
-
(Locked)
Queries: The basic building blocks of SQL3m 7s
-
(Locked)
How to use functions to perform calculations3m 30s
-
(Locked)
Joins using table relationships4m 50s
-
(Locked)
Setting up sample data and files3m 4s
-
(Locked)
Solution: Creating your first query1m 5s
-
-
-
-
-