From the course: Microsoft SQL Server 2019 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Aggregate functions

Aggregate functions - SQL Server Tutorial

From the course: Microsoft SQL Server 2019 Essential Training

Start my 1-month free trial

Aggregate functions

- [Instructor] Functions are little programmatic routines that usually take some input data, process that data, and then output available 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 doesn't actually require any inputs but when you use 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 queries written out here that I'd like to run through on the WideWorldImporters database. This first one is just going to select everything out of the Application.StateProvinces table. Let's go ahead and run lines one through four, and we'll see the data as it exists in the database. Now this returns a total of 53 different records and I can see that by taking a…

Contents