Oreilly - Using T-SQL Functions and Summarizing Results
by John Deardurff | Released April 2019 | ISBN: 9781484245484
Enhance your SELECT statements by invoking a vast library of built-in features and capabilities that SQL Server exposes in the form of functions. This video shows how these functions enable data type conversions, null detections, date and number formatting, and much more. Also available are functions helping you to analyze data in the database itself. These functions enable you to summarize data to count occurrences, compute averages, and generate statistics. The video begins with an introduction to basic functions to work with character data and NULL values. From there you'll move on to functions dealing with conditional structures, NULL values, and formatting. You'll also cover aggregate functions to average, count, and summarize data. Finally, this video discusses how to group result sets by a field using the GROUP BY clause, and how to filter those results after they have been grouped -- using the HAVING clause. Functions are the doorway to an ever-increasing number of powerful database engine features and capabilities. There is so much more that you can do in SQL other than simply SELECT data. Functions enable you to take full advantage of the power that's available to you in Microsoft's flagship database engine. This video is the second in a series and leaves you well positioned to step into the next video covering how to select data from multiple tables. What You Will LearnSort data into groups and count the records in each groupCompute max, min, and mean values for records in a groupFormat dates and numbers for display to end usersFilter to eliminate unwanted groupings from your result setSearch, concatenate, and manipulate stringsDetect NULL values and replace them with real valuesWho This Video Is For Developers, business analysts, and others whose career will benefit from knowledge of SQL for accessing Microsoft SQL Server databases and the data they contain. The video is for anyone working in a SQL Server environment and wanting to derive business value from their organization's data by analyzing that data, creating reports, and even generating visualizations. Show and hide more
- Introduction 00:01:54
- Functions in a SELECT Statement 00:01:29
- Basic String Functions 00:08:57
- Date and Time Functions 00:03:21
- Conditional Functions 00:03:33
- The FORMAT Function 00:03:49
- Functions for NULL Values 00:06:00
- Aggregate Functions 00:03:35
- Aggregate Functions with NULL Values 00:06:34
- Processing Order of a SELECT Statement 00:02:24
- Grouping Results 00:04:25
- Filtering Grouped Results 00:02:28
Show and hide more