Request More Info

First Name*:

Last Name*:

Job Title:

Mail Point:

Company*:

Address*:

Town*:

Post Code*:

Country*:
   Codes

Office Telephone*:

E-mail*:

* Required

Information provided will be used to communicate with you about our products.
Privacy Statement

A Learning Tree representative will contact you to follow up your request for information.

Tidsbegränsat erbjudande  – Upp till 40 % RABATT per kurs
 

Developing SQL Queries for SQL Server®:
Hands-On


Course: 5344 dagar

 E-mail   Print   Q&A   PDF   Facebook   Twitter    Se på svenska

Quick Enrol

You Will Learn How To

  • Develop complex and robust SQL queries for SQL Server 2008, 2005 and 2000
  • Query multiple tables with inner joins, outer joins and self joins
  • Transform data with built-in functions
  • Summarise data using aggregation and grouping
  • Execute analytic functions to calculate ranks
  • Build simple and correlated subqueries

Course Benefits

Microsoft's Transact-SQL is the cornerstone of all SQL Server database operations. In this hands-on course, you learn to exploit the full potential of the SELECT statement to write robust queries using the best query method for your application, test your queries, and avoid common errors and pitfalls.

Who Should Attend

Those who are developing systems using SQL Server databases, or who are using SQL to extract and analyse data from SQL Server databases. Knowledge of SQL Server at the level of Course 137, "SQL Server 2008 Comprehensive Introduction", or Course 925, "SQL Programming Language Introduction", is assumed.

Hands-On Training

Learn by doing as you use Transact-SQL to solve problems and maximise performance. Instructor-led exercises include:
  • Handling NULL values in expressions and conditions
  • Coding inner and outer joins
  • Implementing self joins
  • Computing aggregate results
  • Adding subtotals and grand totals to aggregate results
  • Employing ranking and analytic functions
  • Reusing subqueries as common table expressions
  • Analysing query plans and tuning queries

Course Content

Introduction and Overview

SQL fundamentals

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

Executing queries

  • Analysing query plans
  • Enhancing query performance
  • Testing queries
  • 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
  • The performance implications of 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

  • UNION
  • UNION ALL
  • INTERSECT
  • EXCEPT

Scalar and Aggregate Functions

Taking advantage of scalar functions

  • Converting datatypes
  • Explicit vs. implicit conversion
  • Performing calculations on dates and times
  • Extracting date and time components
  • Determining date and time format
  • Manipulating strings
  • Choosing the right function for the job

Summarising data with aggregate functions

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

Grouping data

  • GROUP BY and GROUP BY ALL
  • Applying conditions with HAVING
  • Calculating moving averages

Extending group queries

  • Nesting grouped aggregates
  • Joins and grouping

Building crosstab reports

  • Using CASE to turn rows into columns
  • Applying PIVOT

Performing Extensive Analysis with Analytic Functions

The OVER clause

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

Calculating ranks

  • RANK and DENSE_RANK
  • 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
  • Handling multirow subquery results

Correlated subqueries

  • Accessing values from the outer query
  • EXISTS vs. IN
  • Identifying duplicates
  • 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

<< Back to SQL Server
 

Related Courses


SQL Server is a registered trademark of Microsoft Corporation.
Learning Tree AnyWareTM is a trademark of Learning Tree International, Inc. in the United States and other countries, and is covered by a patent application pending in the United States.
 
SQL Queries for SQL Server

Course Dates

Live online classroom training.Most events below can be taken in-class or live, online from your home or office with AnyWare.
9 - 12 OctStockholm enrol

UK Dates

19 - 22 JunLondon enrol
28 - 31 AugLondon enrol
6 - 9 NovLondon enrol
15 - 18 JanLondon enrol
26 - 29 MarLondon enrol

US Dates

12 - 15 JunNew York enrol
24 - 27 JulNew York enrol
31 Jul - 3 AugWashington, DC enrol
14 - 17 AugWashington, DC enrol
28 - 31 AugWashington, DC enrol
4 - 7 SepNew York enrol

For AnyWare enrollments, please register at least 7 days prior to the start of the course.

More Dates and Locations.

 

On-Site &
Custom Training

Bring this or any Learning Tree course to your location or have it customized for your organization.

 

Kursdeltagarnas genomsnittsbedömning

De senaste 12 månadernas bedömningar

5 stjärnor:
76 %
4 stjärnor:
22 %
3 stjärnor:
1 %
2 stjärnor:
0 %
1 stjärna:
1 %

 
"Jag valde AnyWare för att slippa resa och vara ifrån familjen. Jag tycker att det varit en kanonbra utbildningsform. Läraren försökte helt klart få med mig i undervisningen och det gillade jag. All information jag fått har varit toppen och jag rekommenderar alla varmt att utnyttja denna utbildningsform om de vill slippa resa."



Certification Core Course
 
What's In It For You: Exploring the Benefits of the SQL Server 2008 Database Engine