
Welcome to the course. In this introduction, you will learn what this course covers, how it fits within the free SQL for Beginners learning path, and how relational database querying differs from database development. We'll also introduce the Careers database that will be used throughout the practical workshops and explain the teaching approach adopted throughout the course.
By the end of this lecture, you will understand the course objectives, the skills you will develop, the intended target audience, and how this course fits within the SQL for Beginners learning path.
This article outlines the software requirements, recommended prerequisites and complete course curriculum. It also explains how the practical workshops are structured, how to use the downloadable SQL scripts, and the best approach for following along and practising each exercise.
By the end of this article, you will understand how the course is organised, what resources are available, and how to get the most from each workshop.
Begin the practical workshops by creating the complete Careers database structure that will be used throughout the remainder of the course. In this workshop, you will execute a prepared SQL script that creates the database, schemas, tables and relationships required for the practical SQL querying workshops.
By the end of this workshop, you will have created the complete Careers relational database structure, providing the foundation for every SQL query you write throughout the remainder of the course.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to recreate the database whenever required and continue practising beyond the course.
With the database structure in place, the next step is to populate the Careers database with realistic sample data. In this workshop, you will execute the prepared data population script and understand why representative sample data is important when learning and testing SQL queries.
By the end of this workshop, you will have populated every table within the Careers database, creating a complete relational dataset that will be queried throughout the remainder of the course.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to recreate the sample data whenever required and experiment with your own SQL queries.
Before beginning the practical querying workshops, it is important to confirm that the Careers database has been created and populated successfully. This article provides a series of verification queries that allow you to confirm the database structure has been created correctly and the sample data has been populated successfully.
By the end of this article, you will have verified that the Careers database structure and sample data are ready for the SQL querying workshops that follow.
The verification script is available as a downloadable resource attached to this lecture. Open it in your IDE and run each query in turn.
Every SQL query begins with the SELECT statement. In this workshop, you will learn how the SELECT statement retrieves data from a database table, why it forms the foundation of SQL querying, and how to return every row and column using the wildcard (*) character. You will also execute your first SQL queries against the completed Careers database.
By the end of this workshop, you will understand the purpose of the SELECT statement, retrieve data from individual database tables, and confidently execute your first SQL queries against a relational database.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
Retrieving every column from a database table is not always necessary. In this workshop, you will learn how to return only the information required by selecting individual columns, improving both the readability and efficiency of your SQL queries. You will also explore how different column selections produce more focused query results.
By the end of this workshop, you will be able to retrieve specific columns from individual database tables and write more precise SQL queries that return only the information required.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
Column aliases allow you to present query results using more meaningful and readable column headings without changing the underlying database structure. In this workshop, you will learn how to rename returned columns using SQL aliases and understand how aliases improve the presentation and readability of query results.
By the end of this workshop, you will be able to rename returned columns using aliases and produce clearer, more professional query output suitable for reporting and data analysis.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
When querying a database, it is common to encounter duplicate values within a column or across a set of selected columns. In this workshop, you will learn how the DISTINCT keyword removes duplicate rows from a query result, helping you retrieve a list of unique values from your data.
By the end of this workshop, you will be able to use the DISTINCT keyword to return unique results from individual database tables and understand when duplicate values should, and should not, be removed.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
Returning every row from a database table is not always necessary. In this workshop, you will learn how to use the TOP keyword to limit the number of rows returned by a query, making it easier to inspect data, test SQL statements, and focus on a smaller subset of information.
By the end of this workshop, you will be able to limit query results using the TOP keyword and confidently retrieve only the number of rows required for your SQL queries.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
Retrieving every row from a database table is rarely required. In this workshop, you will learn how to use the WHERE clause to filter query results based on one or more conditions using SQL comparison operators. Filtering data is one of the most frequently used techniques in SQL and forms the foundation of writing more targeted and meaningful queries.
By the end of this workshop, you will be able to filter rows using the WHERE clause, apply SQL comparison operators, and retrieve only the data that matches your specified criteria.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
Many SQL queries require more than a single condition to retrieve the required information. In this workshop, you will learn how to combine multiple conditions using the AND, OR and NOT logical operators, allowing you to create more precise and flexible SQL queries against individual database tables.
By the end of this workshop, you will be able to combine multiple filtering conditions using AND, OR and NOT, enabling you to retrieve data that satisfies one or more specified criteria.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
Database tables often contain missing or unknown values represented by NULL. In this workshop, you will learn how NULL differs from an empty string or zero, why standard comparison operators cannot be used with NULL values, and how to retrieve rows using the IS NULL and IS NOT NULL operators.
By the end of this workshop, you will be able to identify and retrieve rows containing NULL values, as well as exclude them from query results where appropriate.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
The order in which data is returned can significantly improve the readability and usefulness of query results. In this workshop, you will learn how to sort query results using the ORDER BY clause, arrange data in ascending and descending order, and produce consistent and well-organised output.
By the end of this workshop, you will be able to sort query results using the ORDER BY clause and present data in a logical order that supports effective data analysis and interpretation.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
Relational databases store related information across several tables instead of placing everything in one table.
This article explains why data is separated in this way, how the tables are connected, and how relational queries bring information from those tables together.
By the end of the article, you will understand why relationships are used in a relational database and how SQL can follow those relationships to return useful information.
Before writing relational SQL queries, it helps to understand how the tables in the Careers database are connected.
This article reviews the database structure, explains the main relationships between the tables, and shows how primary keys and foreign keys are used to connect related data.
By the end of the article, you will understand how information is linked across the Careers database and which tables you may need when answering common business questions with SQL.
Before retrieving related data from multiple tables, it is important to understand what happens when no relationship is defined between them. In this workshop, you will learn what a Cartesian Product is, why it occurs, and how querying multiple tables without a relationship returns every possible combination of rows.
By the end of this workshop, you will be able to recognise Cartesian Product queries, understand why they rarely produce meaningful results, and explain why relationships are essential when querying relational databases.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
Before the introduction of the ANSI SQL JOIN syntax, related data was commonly retrieved by listing multiple tables in the FROM clause and defining the relationship within the WHERE clause. In this workshop, you will learn how implicit joins retrieve related data, understand how relationships are defined using the WHERE clause, and recognise this syntax when working with existing SQL code.
By the end of this workshop, you will be able to retrieve related data using implicit joins, understand how the WHERE clause establishes relationships between tables, and recognise this style of SQL when encountered in legacy database systems.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
The INNER JOIN statement is the modern and preferred method of retrieving related information from multiple database tables. In this workshop, you will learn how the INNER JOIN clause uses relationships between tables to return matching records and how explicit joins improve the readability and maintainability of SQL queries.
By the end of this workshop, you will be able to retrieve related data from two database tables using the INNER JOIN statement and understand how explicit joins produce clear and maintainable SQL queries.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
Relational databases often require information to be retrieved from multiple related tables. In this workshop, you'll extend your SQL querying skills by building on a two-table query, adding additional INNER JOIN statements to retrieve richer business information whilst following relationships through the Careers database.
By the end of this workshop, you'll understand how to extend an INNER JOIN query across multiple related tables and retrieve meaningful business information by following the relationships within a relational database.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
Not every related record exists within a relational database. In this workshop, you will learn how the LEFT JOIN statement retrieves all rows from the left table whilst returning matching data from the related table where it exists. You will also see how NULL values represent missing relationships within the query results.
By the end of this workshop, you will be able to retrieve optional related data using the LEFT JOIN statement, interpret NULL values returned by missing relationships, and understand when a LEFT JOIN is more appropriate than an INNER JOIN.
The complete SQL script demonstrated in this workshop is included as a downloadable resource, allowing you to follow along, practise the examples, and revisit the workshop whenever you need.
This article summarises the key concepts covered throughout the relational querying workshops, reinforcing the differences between Cartesian products, implicit joins, INNER JOIN and LEFT JOIN. It also revisits how primary keys and foreign keys enable related data to be retrieved across multiple database tables, and highlights the importance of selecting the most appropriate join and querying technique to satisfy a particular business requirement.
By the end of this article, you will have reinforced your understanding of the core principles of relational querying, know when to apply the techniques introduced in this course, and be well prepared to complete the practical exercises and SQL challenges that follow.
Put your SQL querying skills into practice by completing a series of exercises focused on retrieving, filtering and sorting data from individual database tables. Each exercise has been designed to reinforce the concepts covered throughout the Querying Individual Tables section and encourage you to write your own SQL solutions before reviewing the answers.
By the end of these exercises, you will have strengthened your understanding of querying individual database tables, gained additional confidence writing fundamental SQL queries independently, and be better prepared for the relational querying exercises that follow.
The exercises are provided as a downloadable SQL script attached to this lecture. A separate SQL script containing the solutions is available in the Exercise and Challenge Solutions lecture.
Build upon your relational querying skills by completing practical exercises that retrieve information from multiple related database tables. These exercises reinforce the use of implicit joins, INNER JOIN and LEFT JOIN whilst encouraging you to solve realistic business problems using the Careers database.
By the end of this article, you will have developed greater confidence retrieving related information from multiple tables and applying relational SQL querying techniques independently.
Test your SQL knowledge by completing a collection of practical challenges that combine the concepts covered throughout this course. These independent challenges encourage you to analyse business requirements, identify the appropriate database tables, and develop your own SQL solutions before reviewing the supplied answers.
By the end of these challenges, you will have demonstrated your ability to apply fundamental SQL querying techniques to solve practical relational database problems independently.
The challenges are provided as a downloadable SQL script attached to this lecture. A separate SQL script containing the solutions is available in the Exercise and Challenge Solutions lecture (the final lecture in this section).
Review the complete solutions for every exercise and SQL challenge included in this section. Compare your own queries with the supplied answers, identify areas for improvement, and reinforce your understanding of SQL querying techniques using the Careers database.
By the end of this article, you will have reinforced your understanding of the concepts covered throughout this course and gained additional confidence writing SQL queries independently.
The downloadable SQL scripts contain the complete solutions for the Querying Individual Tables exercises, Querying Relational Data exercises and SQL Challenges.
Congratulations on completing the course. This final article reviews the key SQL concepts covered throughout the practical workshops, summarises the skills you have developed, and explains where these techniques fit within your wider SQL learning journey. You'll also find links to the downloadable course resources and reference material that you can continue using as you develop your SQL knowledge.
By the end of this article, you will have reviewed the core concepts covered throughout the course, understand the next recommended steps in the SQL for Beginners series, and have access to the supporting reference material for future practice.
Congratulations on completing this course. You have now learned how to retrieve information from individual and related database tables using fundamental SQL queries. This article explains where these skills fit within your SQL learning journey and outlines the next topics to continue your development in SQL and T-SQL.
By the end of this article, you will understand the next recommended steps in the SQL for Beginners learning path and have a clear direction for continuing your SQL and T-SQL development.
Thank you for taking the time to complete this course. This article provides a brief introduction to my professional background, teaching philosophy and experience within the software industry. It also explains my practical approach to SQL training and the learning principles that have shaped this course and the wider SQL for Beginners series.
By the end of this article, you will have a better understanding of my professional background, teaching approach and the principles that underpin this SQL training series.
This article outlines the terms governing the use of this course and its accompanying resources. It explains how the downloadable SQL scripts and supporting materials may be used for personal learning, together with the copyright and intellectual property protections that apply to all course content.
By the end of this article, you will understand the permitted use of the course materials and your responsibilities when using, sharing or distributing the accompanying resources.
This course is the fifth and final part of the SQL for Beginners series.
Before starting this course, you should have completed the earlier courses in the series or already possess equivalent SQL and T-SQL knowledge:
SQL for Beginners: Setup & T-SQL First Steps (Free)
SQL for Beginners: Introduction to SQL & T-SQL (Free)
SQL for Beginners: First Simple Database & Queries (Free)
SQL for Beginners: First Relational Database Project (Free)
This course builds directly upon the relational database developed in the previous course and assumes you are already familiar with the Careers database, its tables and the relationships between them.
Rather than creating databases and tables, this course focuses on retrieving information from an existing relational database using fundamental SQL queries.
If you are looking for a course that provides comprehensive coverage of SQL or T-SQL syntax, this is not the right course. Instead, this course introduces the fundamental SQL querying techniques used to retrieve information from relational databases, providing a practical foundation for more advanced SQL and T-SQL development.
As a free introductory course, the workshops are intentionally concise and focused. Complete SQL workshop scripts are provided as downloadable resources, allowing you to spend more time understanding how SQL queries retrieve information from a relational database and less time typing code from scratch. You are encouraged to execute every query, experiment with the examples and modify the SQL statements as you progress through the course.
Building a relational database is one thing. Retrieving meaningful information from it is another.
In this course, you will learn how to retrieve information from the completed Careers database using Microsoft SQL Server and T-SQL. Working through practical workshops, you will gradually progress from querying individual database tables to retrieving related business information using relational SQL queries.
The course begins by exploring the principles of relational database querying before exploring the relationships within the Careers database. You will then learn how to retrieve data using the SELECT statement, filter and sort query results, and progressively build relational SQL queries using implicit joins, INNER JOIN and LEFT JOIN.
Rather than working with isolated SQL examples, every workshop uses the same relational database developed throughout the previous course. This allows you to understand not only how SQL queries are written, but also how relational database design and table relationships enable meaningful business information to be retrieved.
This course also includes a comprehensive collection of supporting materials, including:
SQL Workshop Scripts
Database Verification Scripts
Practical Exercises
SQL Challenges
Complete Solutions
Reference Material
By the end of this course, you will be able to:
Retrieve data from individual database tables using fundamental SQL queries.
Filter and sort query results using SQL.
Retrieve related information from multiple database tables using implicit joins, INNER JOIN and LEFT JOIN.
Understand how Primary Keys and Foreign Keys enable relational database queries.
Apply fundamental SQL querying techniques to answer practical business questions.
Completing this course marks the completion of the free SQL for Beginners learning path. If you would like to continue developing your SQL skills, the commercial courses build naturally upon these foundations by exploring SQL and T-SQL in greater breadth and depth through larger database projects, more advanced querying techniques and increasingly realistic SQL development scenarios.