Microsoft SQL Server Querying Data for Report Developers

DURATION

3 Days

LOCATION

Exeter or onsite at your premises.

INTRODUCTION

This 3 day course is intended for students who need to familiarise themselves with the various querying techniques available to retrieve data from a Microsoft SQL Server database in a report authoring environment, whether that be through an implementation of Microsoft SQL Server Reporting Services or similar reporting tool. No previous knowledge of the SQL language is assumed as the course is designed from the ground up, starting with basic queries and advancing to more complex querying methods. The last module (which is optional) will also give students the opportunity to put their SQL skills into practice by creating a simple report. On completion of the course students will be able to retrieve data using the SQL language and write effective queries for reporting purposes.

PREREQUISITES

Students should ideally be familiar with basic programming concepts.

They should also understand the fundamental design of relational databases including, but not restricted to, the purpose of primary and foreign keys, entity relationships, and data normalization. These prerequisites can be met by taking the 2 day “Microsoft SQL Server 2016 and 2017 Relational Database Design and Querying Fundamentals” course.

COURSE OBJECTIVES

Upon successful completion of this course, students will be able to:

  • Understand SQL Syntax
  • Retrieve, Filter and Sort Data
  • Work with the SQL Server Date and Time Data Types
  • Query Data from Multiple Tables by Using Joins
  • Summarize and Rank Grouped Data
  • Combine and Limit Result Sets
  • Work with Subqueries
  • Understand Basic Common Table Expressions
  • Implement Stored Procedures
  • Implement SQL Code to Create a Simple Report

COURSE OUTLINE

 

1. Introduction to SQL Server Databases

Objects in a SQL Server Database

Database Diagrams

Components of a SQL Server Database Table

 

2. Introduction to SQL and Transact-SQL

ANSI-SQL and Transact-SQL (T-SQL)

Categories of SQL Statements

T-SQL Scripts

Adding Comments to T-SQL Code

 

3. Using the SELECT Statement to Retrieve Data

Examine the Basic Syntax of the SELECT Statement

Using String Literals and Expressions

Retrieving Columns of Data from a Table

Using Aliases for Column Names

 

4. Filtering Rows of Data with the WHERE Clause

How to Use the WHERE Clause

Overview of Operators

Filter Data by Using Comparison Operators

Filter Data by Using String Comparisons

Filter Data by Using Logical Operators

Filter Data Using a Range of Values

Filter Data Using a List of Values

Filter Data with NULL Values

 

5. Formatting and Sorting Result Sets

Sorting Data Using the ORDER BY Clause

Eliminating Duplicate Rows with DISTINCT

Introducing Native SQL Server Functions

Functions Relating to NULL Values

Using the CASE Expression

 

6. Working with SQL Server Data Types

Native SQL Server Data Types

Working with Variables

Data Type Precedence

Implicit Data Type Conversions

Explicit Data Type Conversion Functions

Querying and Modifying Date and Time Data

Native SQL Server Date and Time Functions

 

7. Querying Data from Multiple Tables Using Joins

Introduction to Joins

Using Inner Joins

Using Outer Joins

Using Cross Joins

Using Aliases for Table Names

Joining More than Two Tables

Joining a Table to Itself (Self Join)

 

 

8. Summarizing Data Using Aggregate Functions

Using Aggregate Functions Native to SQL Server

Using Aggregate Functions with NULL Values

Grouping Summarized Data with GROUP BY

Filtering Grouped Data Using the HAVING Clause

 

9. Ranking Grouped Data

Ranking Data Using Ranking Functions

Using ROW_NUMBER

Using RANK

Using DENSE_RANK

Using NTILE

 

10. Combining and Limiting Result Sets

Combining Result Sets Using the UNION Operator

Limiting Result Sets Using the TOP Operator

 

11. Working with Subqueries

Introduction to Subqueries

Using Subqueries as Expressions and Derived Tables

Introducing Correlated Subqueries

Using EXISTS with Correlated Subqueries

Introducing Temporary Tables

 

12. Common Table Expressions

Introduction to Common Table Expressions

Using Basic CTEs

 

13. Controlling Program Execution

Control-of-Flow Language Statements

 

14. Implementing Stored Procedures

Overview of Stored Procedures

Creating and Using a Stored Procedure

Parameterizing Stored Procedures

 

15. Designing a Simple Report in SSRS (Optional)

Introducing SQL Server Reporting Services (SSRS)

Creating a Report Project

Creating a Report

Creating a Data Source

Creating a Dataset

Designing a Basic Report

 

 

TO BOOK

For more information or to book onto our Microsoft SQL Server System Administration training course please contact us on 01392 824 022 or email training@amesolutions.co.uk.

If there is a Microsoft SQL Server course that is not listed on our site, that you are interested in attending then please let us know and we can arrange one to one training onsite with our Trainer.

Still not convinced?
We can help you!

Fill out the form below and one of our IT specialists will contact you.

    Please enter the following code:captcha

    Testimonials

     

     

    PhoneEmailTwitterAME Support ToolApple Mac Support tool