From the course: Microsoft SQL Server 2022 Essential Training
Unlock this course with a free trial
Join today to access over 24,100 courses taught by industry experts.
Aggregate functions - SQL Server Tutorial
From the course: Microsoft SQL Server 2022 Essential Training
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…
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
-
-
-
-
-
-
-
-
Create a view of the data8m 33s
-
(Locked)
Data table indexes3m 49s
-
(Locked)
Create additional indexes on a table2m 52s
-
(Locked)
Aggregate functions7m 14s
-
(Locked)
Use built-in functions5m 15s
-
(Locked)
Leverage user-defined scalar functions7m 12s
-
(Locked)
Introduction to stored procedures3m 58s
-
(Locked)
Create stored procedures5m 34s
-
(Locked)
Parameterized stored procedures4m 42s
-
-
-
-
-