SQL Server

Preferred method of contact:

Developing SQL Queries for SQL Server



Course Number



4 Days

View Schedule

Master the full power of SQL queries to solve complex business problems easily, efficiently, and elegantly with only a few lines of SQL code. In this training course, you learn to exploit the full potential of the SELECT statement, write robust queries using the best method for your application, test your queries, and avoid common errors and pitfalls. Starting in Spring 2017, this course will transition to the following Microsoft version: "Querying Microsoft SQL Server 2014 (20461)" (Course 8463)

You Will Learn How To

  • Develop robust SQL queries, test the queries, and avoid common pitfalls
  • Leverage SQL to apply best practices for solving problems
  • Query multiple tables with inner joins, outer joins, and self-joins
  • Transform data with built-in functions
  • Summarise data using aggregation and grouping

Important Course Information


  • Familiarity with SQL at the level of:


  • This course runs on SQL Server 2014, but is useful to those using different versions

Course Outline

  • Introduction and Overview

SQL fundamentals

  • Retrieving data with SELECT
  • Expressions
  • Literals
  • Handling NULLs properly

Executing queries

  • Analysing query plans
  • Enhancing query performance
  • Selecting the best alternatives
  • Avoiding errors and pitfalls
  • Querying Multiple Tables

Implementing various types of joins

  • Inner joins
  • Cross joins
  • Left, right and full outer joins
  • Equijoins vs. theta joins
  • Adding filter conditions to outer joins

Writing self-joins

  • Joining a table to itself
  • Chaining self-joins
  • Solving time-interval problems

Combining queries with set operators

  • Scalar and Aggregate Functions

Taking advantage of scalar functions

  • Converting datatypes
  • Performing calculations on dates and times
  • Extracting date and time components
  • Manipulating strings
  • Choosing the right function for the job

Summarising data with aggregate functions

  • SUM
  • AVG
  • MIN
  • MAX
  • Managing NULLs
  • Suppressing duplicates

Grouping data

  • Applying conditions with HAVING

Extending group queries

  • Nesting grouped aggregates
  • Joins and grouping

Building crosstab reports

  • Using CASE to turn rows into columns
  • Applying PIVOT
  • Performing Analysis with Analytic Functions

The OVER clause

  • Specifying the ordering before applying the function
  • Splitting the result set into logical partitions

Calculating ranks

  • ROW_NUMBER with ordered sets

Extending the use of aggregates

  • Partitioning in multiple levels
  • Comparing row and aggregate values
  • Building Subqueries

Simple subqueries

  • Subqueries in conditions and column expressions
  • Creating multilevel subqueries
  • Avoiding problems when subqueries return NULLs

Correlated subqueries

  • Accessing values from the outer query
  • Avoiding accidental correlation

Common table expressions

  • Reusable and recursive subqueries
  • Traversing hierarchies
  • Breaking Down Complex Queries
  • Overcoming SQL limitations
  • Reducing complexity and improving performance
  • Exploring alternatives for decomposing: temporary tables, views, common table expressions
Show complete outline
Show Less

Course Schedule

Attend this live, instructor-led course In-Class or Online via AnyWare.

Hassle-Free Enrolment: No advance payment required.
Tuition Fee due 30 days after your course.

16 - 19 May London/AnyWare Enrol Now

How would you like to attend?

Live, Online via AnyWare

AFTERNOON START: Attend these live courses online via Anyware scheduled 2 PM - 9:30 PM BST

23 - 26 May AnyWare Enrol Now

How would you like to attend?

Live, Online via AnyWare

6 - 9 Jun Alexandria, VA/AnyWare Enrol Now

How would you like to attend?

Live, Online via AnyWare

Guaranteed to Run

Bring this Course to Your Organization and Train Your Entire Team
For more information, call 0800 282 353 or click here

Tuition Fee



Course Tuition Fee Includes:

After-Course Instructor Coaching
When you return to work, you are entitled to schedule a free coaching session with your instructor for help and guidance as you apply your new skills.

After-Course Computing Sandbox
You'll be given remote access to a preconfigured virtual machine for you to redo your hands-on exercises, develop/test new code, and experiment with the same software used in your course.

Free Course Exam
You can take your course exam on the last day of your course and receive a Certificate of Achievement with the designation "Awarded with Distinction."



Call 0800 282 353 or click here »

An experienced training advisor will happily answer any questions you may have and alert you to any tuition fee savings to
which you or your organisation may be entitled.

Training Hours

Standard class hours:
9:00 a.m. - 4:30 p.m.

Last day class hours:
9:00 a.m. - 3:30 p.m.

Free Course Exam – Last Day:
3:30 p.m. - 4:30 p.m.

Each class day:
Informal discussion with instructor about your projects or areas of special interest
4:30 p.m. - 5:30 p.m.

AFTERNOON START class hours:
2:00 p.m. - 9:30 p.m.

Last day class hours:
2:00 p.m. - 8:30 p.m.

Free Course Exam – Last Day:
8:30 p.m. - 9:30 p.m.

Each class day:
Informal discussion with instructor about your projects or areas of special interest
9:30 p.m. - 10:30 p.m.

“I am extremely satisfied with my overall experience with the Learning Tree instructor and SQL queries for SQL Server course content. I couldn’t have expected anything better”.

- A. Fey, Business Analyst
Credit Suisse


Please Choose a Language

Canada - English

Canada - Français