
Module 1: The Basics
The material we cover in this module will be used throughout the course. Understanding objects and object names, the processing order of a query, literal values, identifiers and delimiters, SSMS basics, and more… these are things that you will use no matter what you do in SQL.
Lessons
- Introducing databases
- The database table
- SQL basics
- SSMS basics
- Query basics
- The metadata
Lab
- Database Concepts and SSMS
Module 2: The Relational Model
Any discussion about relational databases will inevitably require an understanding of the Relational Model. The RM describes the organization and structure of the database and will have an impact on almost everything in this course and back at work. Also, understanding this important topic is the first step in understanding and applying joins.
Lessons
- Introducing the Relational Model
- The need for joins
- Table relationships
Lab
- Table Relationships
Module 3: Getting the Data
The FROM clause always references a table. The table can be a database table, it can be generated by table-type functions, views, subqueries or joins. In this module, our focus will be on joins and subqueries.
Lessons
- The FROM clause
- Single-join queries
- Multiple-join queries
- Derived-table Subqueries
Labs
- Combining two tables with a Join
- Combining multiple tables with a Join
Module 4: Filtering the data
Now that we can use the FROM clause to define the base table of our query, we need a way to select what we want to include in our results and what we want to exclude. In this module, we look at different ways we can use the WHERE clause to filter the data.
Lessons
- Introduction
- Expressions
- Data type precedence
- Advanced filtering
Lab
- Defining the result set
Module 5: Displaying the data
At this point, we have learned how to define the data to query using the FROM and WHERE clauses. We are ready to project the results from our query and look at ways that the SELECT clause can be used to affect the rows that the query returns. We will also examine several of the system functions..
Lessons
- Introduction
- The ORDER BY clause
- The column list
- System functions
- CASE expression
Lab
- Controlling output rows
Module 6: Aggregating the data
All levels of management need information to provide decision support. Lower levels of management may need to make decisions about what products and how much to have in stock, and higher levels of management may need to understand industry trends to support strategic decisions about where to guide the company. In this module, you will learn how to create Aggregate queries; they provide this powerful type of high-level information.
Lessons
- Introduction
- Aggregation with GROUP B
Lab
- Grouping data
Module 7: Maintain the data
Everything we’ve seen so far in this course has been about reading the data. In this module, we end the course with a look at the three write operations that we collectively call data maintenance: Insert, delete, and update.
Lessons
- Inserting data
- Updating data
- Deleting data
Lab
- Final scenario
This course is intended for Business Analysts, System Administrators, Database Administrators and other professionals with no programming or SQL experience. This course is valuable for anyone who needs to learn how to write a SELECT statement to access SQL Server databases.
Before attending this course, students must have:
- Ability to work with the Windows operating system
- Windows login, startup of applications and programs, menu and toolbar manipulation skills
- Basic knowledge of the purpose of a database
- Use the SQL Server Management Studio tool to browse the definition of the database, find necessary object names, create database diagrams, and execute a SQL query to return data rows.
- Write a simple SELECT statement, returning all the columns and rows and formulate meaningful join strategy to bring together all necessary data.
- Write a WHERE clause to filter the rows based on equality, a list of values, a range of values and a wildcard character condition.
- Understand the impact on filtering based on implicit data conversions using data type precedence and how to create a proper search argument.
- Control the display of data in a SQL SELECT including renaming columns, using simple expressions with function to change output values, conditionally change the output values using CASE expressions, sort the result set, eliminate duplicate rows and control the number of rows returned.
- Write Transact-SQL queries that aggregate values across rows based a group and filter the result set based on aggregated values.