From the course: Microsoft SQL Server 2022 Essential Training

Unlock this course with a free trial

Join today to access over 24,000 courses taught by industry experts.

Aggregate functions

Aggregate functions

- [Instructor] Functions are little programmatic routines that usually take in some input data, then it processes that data and then it outputs a value. We can use them in our SQL SELECT queries to process data and return useful information. Previously, we saw the GetDate function, which didn't actually require any inputs but when you call it, it simply returns the current system date and time. More useful functions can be applied to the data that's stored in your tables and a group of functions, called aggregate functions, can provide you with some very useful statistics about the data that your tables contain. I have a number of these queries written out that I'd like to run through on the WideWorldImporters database. You can find them in the Aggregate_Functions.sql file from the exercise files. Let's go ahead and start at the top and make sure we're targeting the WideWorldImporters database. You can either run…

Contents