From the course: AWS Certified Data Engineer Associate (DEA-C01) Cert Prep

Unlock this course with a free trial

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

SQL functions

SQL functions

- [Instructor] SQL has a large number of functions for performing calculations and working with strings and dates. In this lesson, we'll go over some of the more common ones you may need. First, the numeric functions. ROUND allows you to round a number to a number of decimals. CEIL rounds up to the nearest integer and FLOOR rounds down to the lowest integer. Aggregate functions work on multiple values in a column. For example, AVG, or average, returns the average of the values. MAX and MIN return the maximum and minimum values in the range. SUM simply adds up the values in a column, for example, to get the total order amount over a period of time. The COUNT function counts a number of rows that meet the condition in the where clause. In this example, it counts the number of products that are in accessories. SQL also has functions to work with strings. We've already seen how CONCAT will concatenate a list of strings, which can be literal strings or column values. For example, this…

Contents