We may earn an affiliate commission when you visit our partners.
Daniel Tait

Learn how to write effective and accurate SQL with this course.

You will learn how to read and write complex SQL queries in a relational database (SQL Server). The skills you will learn are also largely applicable to any other major database system, such as MySQL, PostgreSQL, Oracle Database, and much more.

Read more

Learn how to write effective and accurate SQL with this course.

You will learn how to read and write complex SQL queries in a relational database (SQL Server). The skills you will learn are also largely applicable to any other major database system, such as MySQL, PostgreSQL, Oracle Database, and much more.

Knowing how to write SQL is one of the fastest ways to reach your career goals. This is because SQL is consistently the most in-demand skills in the tech sector. SQL can seem simple at first but it can quickly become complicated. It is common for people to a write SQL query without realizing they are getting an incorrect result returned. This course is designed with a focus on accuracy and understanding. You will learn how to avoid the common mistakes people make when writing SQL. Not only that.. but you will get a visual guide to the SQL language by seeing how queries work step-by-step. This is a complete course which covers all the core skills you need to master the SQL language.

I believe that the best way to learn SQL is by writing lots of SQL. For that reason, this course includes over 80 coding challenges where you get to write SQL queries and create database objects. These challenges are based on real-world scenarios and are designed for optimal understanding.

In this course you will learn everything you need to master SQL. Including:

  • Get started with SQL Server and SSMS, two of the world's most popular SQL tools

  • How to install SQL Server on Windows and Mac-OS computers

    • Note: that Mac users will need to use Azure Data Studio rather than SSMS

  • Learn how to do data analysis and data analytics using SQL. Including advanced query techniques

  • Start by learning the fundamentals of the relational model and SQL language

  • Analyzing data using aggregate functions with the

  • and much, much more.

This course is one that puts you in control. Where you get to write SQL throughout the course, instead of watching someone else code. Every section comes with fresh challenges, modeled after real-world tasks and situations.

This comprehensive course allows you to learn at your own pace through an interactive environment.  You will start with the basics and soon find yourself writing advanced SQL queries.

Enroll now

What's inside

Learning objectives

  • How to write accurate sql queries against a database
  • Use sql to perform data analysis
  • Learn to perform group by statements
  • Learn how to join multiple tables - including complex joins
  • Learn how to use window functions, correlated subqueries, set operators, ctes and much more
  • Best practices in sql
  • Replicate real-world situations and query reports
  • How to create tables, views and stored procedures
  • How to make your queries run faster by making them sargable
  • Be comfortable putting sql and sql server on your resume

Syllabus

SQL Statement Fundamentals and Software Setup
Introduction
Understanding the Foundations of SQL
SELECT Statement
Read more
Overview of SQL Server
Windows - How to Setup SQL Server and SSMS on a Windows Computer
Windows - How to Setup the SAMPLEDB Database on Windows Computer

Covers how to download and install SQL Server on a Mac using Docker. Also covers, how to download and install Azure Data Studio and how to create the SAMPLEDB database using Azure Data Studio.

Overview of the Course Challenges
SELECT Challenges
Solutions to the SELECT Challenges
SELECT DISTINCT Statement
SELECT DISTINCT Challenges
Solutions to the SELECT DISTINCT Challenges
Row Ordering - ORDER BY
Filtering Data with TOP
ORDER BY Challenges
Solutions to the ORDER BY Challenges
WHERE Clause - Three-valued Logic
Replacing Nulls in Queries
WHERE Clause - Comparison Operators
WHERE Clause Challenges
Solutions to the WHERE Clause Challenges
Introduction to Collations and Pattern Matching
Pattern Matching - Part 2
Introduction to Character Data Types
Pattern Matching Challenges
Solutions to the Pattern Matching Challenges
Introduction to Aggregate Functions
GROUP BY and Aggregate Functions
HAVING Clause
Logical Query Processing Order
GROUP BY Challenges
Solutions to the GROUP BY Challenges
AND operator
OR operator
Operator Precedence
IN Operator
Logical Operator Challenges
Solutions to the Logical Operator Challenges
Learn how to write different types of table joins including inner joins, outer joins, self-joins, and composite joins. Also includes integrity contraints such as primary key and foreign key.
Inner Joins
Outer Joins - LEFT OUTER JOIN and RIGHT OUTER JOIN
FULL OUTER JOIN
Integrity Constraints
Many-to-many Relationships
Join Challenges
Solutions to the Join Challenges
Composite Joins - Joining on multiple columns
Joining more than two tables
Predicate placement - ON clause vs WHERE clause
Self-referencing Joins
Cross Joins
Advanced Join Challenges
Solutions to the Advanced Join Challenges
Learn how to use set operators in SQL. These operators allow the results of multiple queries to be combined into a single result. You will learn how to use UNION, UNION ALL, INTERSECT, EXCEPT operator
UNION and UNION ALL
INTERSECT
EXCEPT
Set Operator Precedence
SET Operator Challenges
Solutions to the Set Operator Challenges
Subqueries
Self-contained Subqueries
Correlated Subqueries
EXISTS
Introduction to Window Functions
Common Table Expressions
Avoiding the NOT IN trap
Subquery Challenges
Solutions to the Subquery Challenges
Scalar Functions
Concatenation in SQL Server
String Manipulation Functions
Date and Time Functions
Function Challenges
Solutions to the Function Challenges
CASE Expression
CASE Expression Challenges
Solutions to the CASE Expression Challenges
Data Definition Language (DDL) and Data Manipulation Language (DML)
Overview of Data Types
Integer Data Types
DECIMAL Data Type
FLOAT Data Type
CREATE TABLE Statement
INSERT Statement
CREATE TABLE Challenges
Solutions to the CREATE TABLE Challenges
UNIQUEIDENTIFIER (GUID) Data Type
UPDATE Statement
DELETE Statement
TRUNCATE TABLE statement
DROP TABLE Statement
Transactions
Stored Procedures
Stored Procedures Demo
Stored Procedure Challenges
Solutions to the Stored Procedure Challenges
ALTER TABLE Statement and sp_rename

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Provides hands-on experience with over 80 coding challenges based on real-world scenarios, which is ideal for practical skill development and portfolio building
Starts with the fundamentals of the relational model and SQL language, which builds a strong foundation for those new to databases and data querying
Requires Mac users to use Azure Data Studio instead of SSMS, which may present a learning curve for those unfamiliar with the Azure environment
Covers advanced query techniques, including window functions, correlated subqueries, and set operators, which are essential for complex data analysis and reporting
Explores how to create tables, views, and stored procedures, which are core skills for database design, management, and application development
Teaches how to optimize queries for faster execution by making them sargable, which is a valuable skill for improving database performance and efficiency

Save this course

Save The Complete SQL Course 2024 - Learn by Doing - SQL Server to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in The Complete SQL Course 2024 - Learn by Doing - SQL Server with these activities:
Review Relational Database Concepts
Solidify your understanding of relational database concepts before diving into SQL. Knowing the underlying principles will make learning SQL much easier.
Browse courses on Relational Databases
Show steps
  • Review the definitions of tables, rows, columns, and keys.
  • Study the concept of normalization and its benefits.
  • Practice drawing ER diagrams for simple database schemas.
Review 'SQL Queries for Mere Mortals'
Enhance your understanding of SQL queries with a well-regarded guide. This book provides a solid foundation and practical examples to improve your SQL skills.
Show steps
  • Read the first five chapters covering basic SQL syntax and data retrieval.
  • Complete the exercises at the end of each chapter.
  • Take notes on key concepts and syntax rules.
SQLZoo Tutorial
Reinforce your SQL knowledge through interactive exercises. SQLZoo offers a variety of SQL tutorials and quizzes to test your skills.
Show steps
  • Work through the SQLZoo SQL Tutorial, focusing on SELECT, WHERE, and JOIN clauses.
  • Complete the quizzes at the end of each section to assess your understanding.
  • Review any areas where you struggled and repeat the exercises.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Create a SQL Cheat Sheet
Consolidate your learning by creating a cheat sheet of common SQL commands and syntax. This will serve as a handy reference during and after the course.
Show steps
  • Compile a list of essential SQL commands (SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP).
  • Include syntax examples for each command, including common options and clauses.
  • Organize the cheat sheet logically for easy reference.
Design a Database Schema
Apply your SQL knowledge by designing a database schema for a real-world scenario. This project will help you understand how to structure data and create relationships between tables.
Show steps
  • Choose a real-world scenario (e.g., library, online store, social network).
  • Identify the entities and attributes for your database.
  • Create an ER diagram to visualize the relationships between entities.
  • Write the SQL CREATE TABLE statements to implement your schema.
Review 'Effective SQL'
Deepen your understanding of SQL best practices with this guide. Learn how to write more efficient and maintainable SQL code.
Show steps
  • Read the sections on query optimization and indexing.
  • Apply the techniques learned to improve the performance of your SQL queries.
  • Discuss the concepts with peers or in online forums.
Optimize SQL Queries
Improve your SQL skills by optimizing existing queries for performance. This activity will teach you how to identify and resolve bottlenecks in SQL code.
Show steps
  • Obtain a set of SQL queries from a real-world application or database.
  • Analyze the execution plan for each query to identify performance bottlenecks.
  • Rewrite the queries to improve performance, using techniques such as indexing and query optimization.
  • Measure the performance improvement after optimization.

Career center

Learners who complete The Complete SQL Course 2024 - Learn by Doing - SQL Server will develop knowledge and skills that may be useful to these careers:
Database Administrator
A database administrator manages and maintains the performance of databases. This role often involves writing complex SQL queries, similar to those taught in this course, to extract, manipulate and analyze data. This course helps a future database administrator learn to avoid common mistakes when writing SQL, including how to optimize queries for speed. The course's focus on accuracy helps ensure a database administrator will work effectively. The course material covers data definition language, data manipulation languages, and stored procedures—all skills essential for a database administrator. It also provides experience with SQL Server and SSMS, tools many database administrators use daily.
Data Analyst
A data analyst interprets data to identify trends and insights, often relying heavily on structured query language for data retrieval. This course would help a data analyst learn how to write effective SQL queries, including advanced techniques. It provides knowledge of relational database concepts, which are essential to using SQL effectively. By taking this course, a data analyst will learn to create complex queries using techniques such as joins, subqueries, aggregate functions, and window functions. This course emphasizes accurate and effective query writing, which is critical for producing reliable analysis. It may be especially helpful for a data analyst who wants to work with SQL Server, as the course covers this platform directly.
Data Engineer
A data engineer builds and maintains the infrastructure for data storage and processing, which often includes working with SQL. The course teaches the fundamentals of the SQL language, along with important considerations such as query accuracy, which a data engineer needs to understand. This course's focus on real-world scenarios and hands-on challenges helps a data engineer become proficient in writing SQL queries. It covers creating database objects, such as tables and views, as well as writing stored procedures, and this knowledge is crucial for a data engineer. This is a useful course for an aspiring data engineer because it gives a comprehensive overview of SQL Server, a popular database system.
Business Intelligence Analyst
A business intelligence analyst uses data to inform business decisions and strategy. This requires a strong foundation in SQL, as this course provides, to extract relevant data to analyze. This course offers an in-depth look at SQL Server, which many business intelligence analysts use, and it would help a business intelligence analyst create complex queries to get valuable insights. The course’s emphasis on writing accurate SQL is critical for a business intelligence analyst because reports based on inaccurate queries can lead to bad decisions. The course's practical exercises in creating database objects and writing stored procedures are also relevant to this role. This may be a useful course for a business intelligence analyst.
Software Developer
A software developer often works with databases and needs to write SQL queries to interact with them. This course helps a software developer build a strong foundation in SQL, covering the fundamentals and advanced query techniques, including joins, subqueries, and window functions. This course is useful for a software developer because it emphasizes writing accurate SQL, which is important for building reliable applications. The course also includes instruction on setting up SQL Server, which allows a software developer to practice database interactions directly. It also has valuable lessons on how to create tables and stored procedures, which enhance database interaction within the software code.
Reporting Analyst
A reporting analyst creates reports that summarize data and help decision-making. This role requires using SQL to pull data from databases, making this course a useful tool. The course would be helpful to a reporting analyst who needs to write accurate and efficient SQL queries; it teaches skills in subqueries, joins, and aggregate functions. With its emphasis on real-world scenarios and practical challenges, this course helps a reporting analyst gain confidence writing SQL, which helps streamline report creation. The course content includes query optimization techniques, which help improve the speed and accuracy of reports. It also introduces concepts like CTEs, which are helpful when building complex reports. This course may be particularly helpful for a reporting analyst who works with SQL Server.
Data Architect
A data architect designs and maintains systems for managing data, often requiring a deep understanding of SQL database interactions. This course could be useful for a data architect because of its comprehensive coverage of SQL, from fundamental to advanced techniques; the course also includes information on database object creation and stored procedures. A data architect typically possesses skills in logical and physical database design, and this course provides additional insight into the practical application of those designs using SQL Server. This course's emphasis on writing accurate code is useful to the data architect, who is responsible for maintaining the integrity of data systems. This course may be useful for a data architect.
System Analyst
A system analyst evaluates and improves computer systems, which can involve working with data and databases. This course may be useful for a system analyst because it explains how to effectively write SQL queries, including how to perform data analysis and use aggregate functions. The course also covers database concepts like joins and subqueries, which are relevant to understanding data flows within systems. A system analyst should understand how queries execute and how database objects work; this course therefore provides valuable foundational knowledge. While a system analyst may not write SQL daily, the knowledge this course provides allows them to assess how systems interact with data storage.
Technical Support Specialist
A technical support specialist provides assistance to users with technology-related issues. Sometimes, this involves understanding SQL queries to troubleshoot problems within database systems. This course could be useful for a technical support specialist because it teaches fundamental SQL concepts and how to write accurate queries, and this background knowledge will help when assisting others. The course explains how to set up SQL Server and SSMS, which could be relevant for providing support to users within that environment. This course can help a technical support specialist gain a deeper understanding of how SQL works and its role in certain systems. It provides necessary context for a technical support specialist, and it could be especially useful if the support role includes SQL Server systems.
Quality Assurance Analyst
A quality assurance analyst tests software and systems to identify defects, which sometimes requires querying databases to verify data integrity. This course may be helpful for a quality assurance analyst, as it teaches how to write SQL queries, including those needed for data analysis and validation. The course covers concepts such as joins, subqueries, and aggregate functions, which helps a quality assurance analyst find and create test data. This course contains information on SQL Server and SSMS, which are valuable when performing analysis of data and testing in that environment. The course's focus on writing accurate queries helps ensure a quality assurance analyst can write reliable tests, and this may be a useful course for a quality assurance analyst.
Financial Analyst
A financial analyst uses data to analyze financial performance, and this can often involve working with data stored in databases. This course may be useful for a financial analyst by teaching them how to extract and manipulate data using SQL. The course covers data analysis and aggregate functions, which are relevant to financial analysis. With this course, a financial analyst may better understand how to create queries to pull financial information from SQL databases. This course may help a financial analyst retrieve data from SQL Server, and it may be especially helpful if the analyst works with a database that uses SQL.
Market Research Analyst
A market research analyst analyzes market data to understand consumer trends, and this can involve querying databases for relevant data. This course may be helpful for a market research analyst by teaching them how to write SQL queries to access and extract data. The course covers data analysis using SQL, which will help when analyzing market data. Also, this course includes knowledge of relational database concepts, which enhances working with databases containing market research data. For a market research analyst who works with databases using SQL Server, this course may be especially useful. The practical skills gained from this course may be beneficial in data-driven market research.
Project Manager
A project manager oversees projects and often interacts with project data, which can be stored in databases. This course may be useful for a project manager who wants a basic understanding of SQL, as this course provides a practical overview of writing SQL queries. The course also covers SQL Server and SSMS, which the project manager may encounter when working with technical teams. While a project manager may delegate SQL-related tasks, this course provides a basic understanding of how data is accessed. This increased familiarity may help a project manager better communicate with technical team members and understand the scope of data-related tasks. This course may be helpful for a project manager.
Operations Research Analyst
An operations research analyst uses mathematical and analytical methods to improve business processes, often working with data from various sources. Understanding SQL can occasionally be helpful to an operations research analyst, as this course helps build a foundation in writing SQL queries. This course may be useful to a operations research analyst who sometimes needs to access database data to use in analysis. The course provides information about SQL Server and introduces concepts such as joins and subqueries, which can be useful for data retrieval. While many operations research tasks do not require SQL, this course provides valuable data access skills. This may be useful for an operations research analyst who wishes to understand how databases are structured.
Technical Writer
A technical writer creates documentation for technical products or processes. This course may be useful for a technical writer in a specialized field who needs to understand SQL concepts. For a technical writer who has to write about software or databases that use SQL, having the knowledge gained from this course may be beneficial. The course's introduction to SQL fundamentals may help a technical writer understand the technical aspects of SQL-based systems. This course may be useful in learning enough about the SQL language to explain it to a non-technical audience. While not directly related to writing, it helps technical writers improve their understanding databases.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in The Complete SQL Course 2024 - Learn by Doing - SQL Server.
Provides a practical, hands-on approach to learning SQL. It covers the fundamentals of SQL queries in a clear and accessible manner, making it ideal for beginners. The book includes numerous examples and exercises to reinforce learning. It useful reference for writing effective and accurate SQL queries.
Offers practical advice on writing efficient and maintainable SQL code. It covers a wide range of topics, including query optimization, indexing, and data modeling. It valuable resource for intermediate to advanced SQL users. This book provides specific techniques to improve your SQL skills.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser