M20461: Querying Microsoft SQL Server

5 Day Course
Hands On
Official Microsoft Curriculum
Code M20461

Book Now - 1 Delivery Method Available:

Classroom Virtual Classroom Private Group - Virtual Self-Paced Online


This 5-day instructor led course provides delegates with the technical skills required to write basic Transact-SQL queries for Microsoft SQL Server 2014. This course is the foundation for all SQL Server-related disciplines; namely, Database Administration, Database Development and Business Intelligence. This course helps people prepare for exam 70-461.


After completing this course, students will be able to:

  • Write SELECT queries
  • Query multiple tables
  • Sort and filter data
  • Describe the use of data types in SQL Server
  • Modify data using Transact-SQL
  • Use built-in functions
  • Group and aggregate data
  • Use subqueries
  • Use table expressions
  • Use set operators
  • Use window ranking, offset and aggregate functions
  • Implement pivoting and grouping sets
  • Execute stored procedures
  • Program with T-SQL
  • Implement error handling
  • Implement transactions

Target Audience

This course is intended for Database Administrators, Database Developers, and Business Intelligence professionals. The course will very likely be well attended by SQL power users who aren't necessarily database-focused or plan on taking the exam; namely, report writers, business analysts and client application developers.

Training Partners

We work with the following best of breed training partners using our bulk buying power to bring you a wider range of dates, locations and prices.


Collapse all

Introduction to Microsoft SQL Server 2014 (8 topics)

  • SQL Server Denali Architecture
  • Working with SQL Server Denali Tools
  • Working with SQL Server Databases
  • Lab: Working with SQL Server Denali Tools (Azure enabled)
  • Working with SQL Server Management Studio
  • Exploring with Database Objects
  • Organizing and Creating T-SQL Scripts
  • Using Books Online

Introduction to Transact-SQL Querying (8 topics)

  • Introducing Transact-SQL
  • Understanding Sets
  • Understanding Predicate Logic
  • Understanding the Logical Order of Operations in SELECT Statements
  • Lab: Introduction to Transact-SQL Querying
  • Executing Basic SELECT Statements
  • Executing queries which filter data using predicates
  • Executing queries which sort data using ORDER BY

Writing SELECT Queries (9 topics)

  • Writing Simple SELECT Statements
  • Eliminating Duplicates with DISTINCT
  • Using Column and Table Aliases
  • Writing Simple CASE Expressions
  • Lab: Writing Basic SELECT statements
  • Write simple SELECT statements
  • Eliminate Duplicates using DISTINCT
  • Use table and column aliases
  • Use a simple CASE expression

Querying Multiple Tables (9 topics)

  • Understanding Joins
  • Querying With Inner Joins
  • Querying With Outer Joins
  • Querying Using Self and Cross Joins
  • Lab: Querying Multiple Tables
  • Write queries using inner joins
  • Write queries using multi-table joins
  • Write queries using self joins
  • Write queries using outer joins

Sorting and Filtering Data (9 topics)

  • Sorting Data
  • Filtering Data
  • Filtering with the TOP and OFFSET-FETCH Options
  • Working with Unknown Values
  • Lab: Filtering and Sorting Data
  • Write queries that filter data using a WHERE clause
  • Write queries that sort data with the ORDER BY clause
  • Write queries that filter data using the TOP option
  • Write queries that filter data using the OFFSET-FETCH clause

Working with SQL Server Denali Data Types (8 topics)

  • Introducing SQL Server Denali Data Types
  • Working with Character Data
  • Working with Date and Time Data
  • Lab: Working with SQL Server 2012 Data Types
  • Write queries which return date and time data
  • Write queries which use date and time functions
  • Write queries which return character data
  • Write queries which use character functions

Using Built-In Functions (7 topics)

  • Writing Queries with Built-In Functions
  • Using Conversion Functions
  • Using Logical Functions - Using Functions to Test for Nullability
  • Lab: Using Built-In Functions
  • Write queries which use conversion functions
  • Write queries which use logical functions
  • Write queries which test for nullability

Grouping and Aggregating Data (8 topics)

  • Using Aggregate Functions
  • Using the GROUP BY Clause
  • Filtering Groups with the HAVING Clause
  • Lab: Grouping and Aggregating Data
  • Write queries which use the GROUP BY clause
  • Write queries which use aggregate functions
  • Write queries which use distinct aggregate functions
  • Write queries which filter groups with the HAVING clause

Using Subqueries (8 topics)

  • Writing Self-Contained Subqueries
  • Writing Correlated Subqueries
  • Using the EXISTS Predicate with Subqueries
  • Lab: Using Subqueries
  • Write queries which use self-contained subqueries
  • Write queries which use correlated subqueries
  • Write queries which use scalar and multi-result subqueries
  • Write queries which use the IN and EXISTS predicates

Using Table Expressions (7 topics)

  • Views
  • Table Expressions
  • Lab: Using Table Expressions
  • Write queries which use views
  • Write queries which use derived tables
  • Write queries which use common table expressions
  • Write queries which use inline table-valued expressions

Use Set Operators (5 topics)

  • Lab: Use Set Operators
  • Write queries which use UNION set operators and UNION ALL multi-set operators
  • Write queries which use CROSS APPLY and OUTER APPLY operators
  • Write queries which use APPLY with derived tables and functions
  • Write queries which use EXCEPT and INTERSECT operators

Using Window Ranking, Offset and Aggregate Functions (4 topics)

  • Lab: Using Window Ranking, Offset and Aggregate Functions
  • Write queries which use ranking functions
  • Write queries which use offset functions
  • Write queries which use window aggregate functions

Pivoting and Grouping Sets (5 topics)

  • Lab: Pivoting and Grouping Sets
  • Write queries which use the PIVOT operator
  • Write queries which use the GROUPING SETS
  • Write queries which use GROUP BY ROLLUP
  • Write queries which use GROUP BY CUBE

Querying SQL Server Metadata (4 topics)

  • Lab: Querying SQL Server Metadata
  • Querying system catalog views
  • Querying system functions
  • Querying system dynamic management views

Executing Stored Procedures (5 topics)

  • Lab: Executing Stored Procedures
  • Use the EXECUTE statement to invoke stored procedures
  • Pass parameters to stored procedures
  • Return results from a stored procedure using the OUTPUT clause
  • Execute system stored procedures

Programming with T-SQL (5 topics)

  • Lab: Programming with T-SQL
  • Declaring variables and delimiting batches
  • Using control of flow elements
  • Generating dynamic SQL
  • Using synonyms

Implementing Error Handling (4 topics)

  • Lab: Implementing Error Handling
  • Redirecting errors with TRY/CATCH
  • Creating error handling routines in a CATCH block with ERROR functions
  • Using THROW to pass an error message back to a client

Implementing Transactions (4 topics)

  • Lab: Implementing Transactions
  • Controlling transactions with BEGIN and COMMIT
  • Using XACT_ABORT
  • Adding transaction handling logic to a CATCH block

Improving Query Performance (5 topics)

  • Lab: Improving Query Performance
  • Viewing query execution plans
  • Using SET STATISTICS statements
  • Viewing index usage
  • Comparing cursors to set-based queries


  • Working knowledge of relational databases.
  • Basic knowledge of the Microsoft Windows operating system and its core functionality.

Prerequisite Certifications

Scheduled Dates

Please select from the dates below to make an enquiry or booking.


Different pricing structures are available including special offers. These include early bird, late availability, multi-place, corporate volume and self-funding rates. Please arrange a discussion with a training advisor to discover your most cost effective option.

Code Location Duration Price Oct Nov Dec Jan Feb Mar
Later scheduled dates may be available for this course.

Course PDF


Share this Course


Recommend this Course