From the course: Complete Guide to SQL for Data Engineering: from Beginner to Advanced
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Using mathematical functions - SQL Tutorial
From the course: Complete Guide to SQL for Data Engineering: from Beginner to Advanced
Using mathematical functions
- [Instructor] Mathematical function in SQL are like magical tools that help you perform various calculation on numeric data. Some of the most common numerical functions are like, ABS, CEIL, FLOOR, ROUND, SQRT. Let's just get down to our pgAdmin, and see how we can use all of them. For example, let's start with absolute. I said select abs, and I pass a value, let's say call, 2.6. Now, if I execute this, I will get a output 2.6. This output is nothing but a positive number. Remember, absolute is trying to give you the positive value or the absolute value of a number. Whether the number is negative or positive with absolute, you always get the positive value. Even if I run this with select absolute 2.6, I will get the positive result only. Similarly, let's say for example, if I want to know the ceiling, so I say ceil(2.3). So ceil is basically try to find out the maximum or the higher integer nearby this number. 2.3 ceil…
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
-
-
-
-
-
-
-
(Locked)
Introduction to SQL functions4m 30s
-
(Locked)
Using mathematical functions4m 56s
-
(Locked)
Working with date functions9m 2s
-
(Locked)
Working with time functions7m 6s
-
(Locked)
String functions: Concatenation and trimming5m 45s
-
(Locked)
String functions: Changing case and extracting substrings7m 22s
-
(Locked)
Challenge: Play with strings48s
-
(Locked)
Solution: Play with strings50s
-
(Locked)
-
-
-
-
-
-
-
-