Online Course bestseller
SQL

Become proficient in SQL and manage relational databases with confidence

4.8

862 reviews on
140,558 students already enrolled
  • Institute of Analytics
  • The Association of Data Scientists
  • E-Learning Quality Network
  • European Agency for Higher Education and Accreditation
  • Global Association of Online Trainers and Examiners

Skill level:

Basic

Duration:

13 hours
  • Lessons (9 hours)
  • Practice exams (45 minutes)
  • Projects (2 hours)

CPE credits:

15
CPE stands for Continuing Professional Education and represents the mandatory credits a wide range of professionals must earn to maintain their licenses and stay current with regulations and best practices. One CPE credit typically equals 50 minutes of learning. For more details, visit NASBA's official website: www.nasbaregistry.org

Accredited

certificate

What you learn

  • Acquire essential SQL skills for roles in data analytics and engineering.
  • Learn database fundamentals and apply SQL theory in real scenarios.
  • Create relational databases and retrieve and analyze data using SQL queries.
  • Adopt SQL best practices from an experienced programmer.
  • Install and use MySQL Server and Workbench tools.

Topics & tools

SQLTheoryProgrammingRelational DatabasesETLDatabase TheoryData EngineeringData PreprocessingSql

Your instructor

Course OVERVIEW

Description

CPE Credits: 15 Field of Study: Information Technology
Delivery Method: QAS Self Study
SQL is one of the fundamental programming languages you need to learn to work with databases. When you are a data scientist in a company and you need data to perform your analysis, you usually have two options: extract it on your own or contact the IT team. Of course, the ability to extract your own data is an extremely valuable skill to have. In this course, we will teach you everything you need to know in terms of database management and creating SQL queries.

Prerequisites

  • Any SQL environment (such as SQLite, MySQL Workbench, or an online SQL editor).

Advanced preparation

  • None

Curriculum

181 lessons 151 exercises 1 project 4 exams
  • 1. Introduction to Databases, SQL, and MySQL
    14 min
    Whether you are working in business intelligence (BI), data science, database administration, or back-end development, you will have to retrieve information from a server storing large amounts of data. To achieve this, you need SQL. The relational database management system we chose for this course is MySQL. We did that because MySQL is open-source, reliable, and mature. In one of the videos of this section, we will provide you with step-by-step guidance when you install MySQL Server and MySQL Workbench. The introductory part of this course pays significant attention to database theory. You will learn the meaning of terms like database, data table, data entity, record, field, relation, and more.
    14 min
    Whether you are working in business intelligence (BI), data science, database administration, or back-end development, you will have to retrieve information from a server storing large amounts of data. To achieve this, you need SQL. The relational database management system we chose for this course is MySQL. We did that because MySQL is open-source, reliable, and mature. In one of the videos of this section, we will provide you with step-by-step guidance when you install MySQL Server and MySQL Workbench. The introductory part of this course pays significant attention to database theory. You will learn the meaning of terms like database, data table, data entity, record, field, relation, and more.
    Welcome to SQL Free
    Why SQL? Free
    Exercise Free
    Why MySQL? Free
    Exercise Free
    Introduction to databases Free
    Exercise Free
  • 2. SQL Theory
    20 min
    In this section, we study the components of the Structured Query Language, SQL. We will focus on the following syntaxes: Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL), and Transaction Control Language (TCL). In addition, we will introduce you to the concept of using SQL Keywords.
    20 min
    In this section, we study the components of the Structured Query Language, SQL. We will focus on the following syntaxes: Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL), and Transaction Control Language (TCL). In addition, we will introduce you to the concept of using SQL Keywords.
    SQL as a declarative language Free
    Data definition language (DDL) Free
    Exercise Free
    SQL keywords Free
    Exercise Free
    Data manipulation language (DML) Free
    Exercise Free
    Data control language (DCL) Free
    Exercise Free
    Transaction control language (TCL) Free
    Exercise Free
  • 3. Basic Database Terminology
    34 min
    We are sure that you will be many times more efficient and precise in producing your SQL queries if you are in good command of basic database terminology. At the end of the day, that's why SQL has been created: to help you store, retrieve, and manipulate data from relational databases. So, knowing exactly what a relational database is and understanding the meaning of terms like 'relational schema,' 'primary key,' 'foreign key,' 'unique key,' and 'entity relationships' is something that is crucial for giving you confidence and precision in your work with SQL.
    34 min
    We are sure that you will be many times more efficient and precise in producing your SQL queries if you are in good command of basic database terminology. At the end of the day, that's why SQL has been created: to help you store, retrieve, and manipulate data from relational databases. So, knowing exactly what a relational database is and understanding the meaning of terms like 'relational schema,' 'primary key,' 'foreign key,' 'unique key,' and 'entity relationships' is something that is crucial for giving you confidence and precision in your work with SQL.
    Relational database essentials Free
    Exercise Free
    Databases vs spreadsheets Free
    Exercise Free
    Database terminology Free
    Exercise Free
    Relational schemas - Primary key Free
    Exercise Free
    Relational schemas - Foreign key Free
    Exercise Free
    Relational schemas - Unique key and null values Free
    Exercise Free
    Relationships Free
    Exercise Free
  • 4. Installing MySQL and Getting Acquainted with the Interface
    30 min
    In this section, we will provide you with step-by-step guidance on how to install MySQL Server and MySQL Workbench, the two components you need in order to start working with MySQL. Then, you'll need to set up a connection between Workbench and the server. Of course, we will show you how to do that, and then we will conclude by making a quick tour of the MySQL Workbench interface. What you will see in these lectures will be more than enough of a preparation for working with the software before you start coding in the next section.
    30 min
    In this section, we will provide you with step-by-step guidance on how to install MySQL Server and MySQL Workbench, the two components you need in order to start working with MySQL. Then, you'll need to set up a connection between Workbench and the server. Of course, we will show you how to do that, and then we will conclude by making a quick tour of the MySQL Workbench interface. What you will see in these lectures will be more than enough of a preparation for working with the software before you start coding in the next section.
    Installing MySQL
    Additional note – Installing – Visual C
    Installing MySQL on macOS and Unix systems
    The Client-Server Model
    Setting up a connection
    Important - Please read
    New Authentication Plugin - Creating a New User
    Introduction to the MySQL interface
    Exercise
  • 5. First Steps in SQL
    46 min
    It is time to create your first database and make your first steps in SQL. In this section, we will introduce you to string, fixed- and floating-point, and other useful data types. You will learn how to create a database table and how to use such a table. Not only that, but we will also introduce the different types of constraints that can be assigned to tables (primary key, foreign key, unique key, default, not null, and other types of constraints)
    46 min
    It is time to create your first database and make your first steps in SQL. In this section, we will introduce you to string, fixed- and floating-point, and other useful data types. You will learn how to create a database table and how to use such a table. Not only that, but we will also introduce the different types of constraints that can be assigned to tables (primary key, foreign key, unique key, default, not null, and other types of constraints)
    Creating a Database - Part I
    Creating a Database - Part I - Exercise
    SQL files
    Creating a Database - Part II
    Exercise
    Creating a Database - Part II - Еxercise
    Introduction to data types
    Exercise
    String data types
    Exercise
    Integers
    Exercise
    Fixed and floating-point data types
    Exercise
    Other useful data types
    Exercise
    Creating a table
    Creating a table - Exercise
    Using databases and tables
    Using databases and tables - Exercise
    Additional notes on using tables
    Additional notes on using tables - Exercise
    Exercise
  • 6. MySQL Constraints
    38 min
    So far, you've been acquainted with crucial theoretical topics and fundamentals in coding in MySQL. In this section, both will come together to show you how primary keys, foreign keys, and unique keys are applied in practice through MySQL Constraints. Once you have mastered these three, we will continue with other types of constraints that you will encounter daily in your work, such as the DEFAULT Constraint and the NOT NULL Constraint.
    38 min
    So far, you've been acquainted with crucial theoretical topics and fundamentals in coding in MySQL. In this section, both will come together to show you how primary keys, foreign keys, and unique keys are applied in practice through MySQL Constraints. Once you have mastered these three, we will continue with other types of constraints that you will encounter daily in your work, such as the DEFAULT Constraint and the NOT NULL Constraint.
    PRIMARY KEY constraint
    PRIMARY KEY constraint- Exercise
    Exercise
    FOREIGN KEY constraint - Part I
    FOREIGN KEY constraint - Part II
    FOREIGN KEY constraint - Part II - Exercise
    UNIQUE Constraint
    Exercise
    UNIQUE Constraint - Code
    DEFAULT Constraint
    DEFAULT Constraint - Code
    NOT NULL Constraint - Part I
    NOT NULL Constraint - Part I - Code
    NOT NULL Constraint - Part II
    Exercise
  • 7. SQL Best Practices
    10 min
    There are many ways you can write your SQL code, but there are only a few that are considered professional. In this part of the course, we will teach you how to write professional code and how to adhere to professional best practices. To reinforce what you have learned, we will wrap up this section with an easy-to-understand practical example.
    10 min
    There are many ways you can write your SQL code, but there are only a few that are considered professional. In this part of the course, we will teach you how to write professional code and how to adhere to professional best practices. To reinforce what you have learned, we will wrap up this section with an easy-to-understand practical example.
    Coding techniques and best practices - Part I
    Exercise
    Coding techniques and best practices - Part II
    Exercise
  • 8. Loading the Data
    3 min
    One of the best features of our SQL training is that it uses a real-life database – the “Employees” database. We will use it to manipulate data in MySQL in all lessons. In this chapter, you will download the SQL file and will run it in Workbench.
    3 min
    One of the best features of our SQL training is that it uses a real-life database – the “Employees” database. We will use it to manipulate data in MySQL in all lessons. In this chapter, you will download the SQL file and will run it in Workbench.
    Loading the 'employees' database
    Loading the 'employees' database - Link
    Exercise
  • 9. SQL SELECT STATEMENT
    89 min
    When doing analysis with SQL, regardless of whether in that moment you are working on the administration of your relational database, on a business intelligence analysis, or are doing some preliminary work in the data science field, you will be constantly dealing with the SQL SELECT Statement. We cannot stress enough how important it is to have completely internalized the structure of this particular SQL statement. That's why, in this section, we will make sure you will learn and practice all the fundamentals of the SELECT Statement. We won't let you proceed before you feel comfortable using it.
    89 min
    When doing analysis with SQL, regardless of whether in that moment you are working on the administration of your relational database, on a business intelligence analysis, or are doing some preliminary work in the data science field, you will be constantly dealing with the SQL SELECT Statement. We cannot stress enough how important it is to have completely internalized the structure of this particular SQL statement. That's why, in this section, we will make sure you will learn and practice all the fundamentals of the SELECT Statement. We won't let you proceed before you feel comfortable using it.
    SELECT… FROM…
    SELECT - FROM - Exercise
    Exercise
    What to Expect from the Upcoming Course Coding Exercises
    Coding exercise
    Coding exercise
    Coding exercise
    WHERE
    WHERE - Exercise
    Coding exercise
    AND
    AND - Exercise
    Coding exercise
    OR
    OR - Exercise
    Coding exercise
    Operator Precedence
    Operator Precedence - Exercise
    Coding exercise
    IN - NOT IN
    IN - NOT IN - Exercise
    Coding exercise
    Coding exercise
    LIKE - NOT LIKE
    LIKE - NOT LIKE - Exercise
    Coding exercise
    Coding exercise
    Coding exercise
    Wildcard Characters
    Wildcard Characters - Exercise
    Coding exercise
    Coding exercise
    BETWEEN… AND…
    BETWEEN - AND - Exercise
    Coding exercise
    Coding exercise
    Coding exercise
    IS NOT NULL - IS NULL
    IS NOT NULL - IS NULL - Exercise
    Coding exercise
    Other Comparison Operators
    Other Comparison Operators - Exercise
    Coding exercise
    Coding exercise
    SELECT DISTINCT
    SELECT DISTINCT - Exercise
    Coding exercise
    Introduction to Aggregate Functions
    Introduction to Aggregate Functions - Exercise
    Coding exercise
    Coding exercise
    ORDER BY
    ORDER BY - Exercise
    Coding exercise
    GROUP BY
    Using Aliases (AS)
    Using Aliases (AS) - Exercise
    Coding exercise
    HAVING
    HAVING - Exercise
    Coding exercise
    WHERE vs HAVING - Part I
    WHERE vs HAVING - Part II
    WHERE vs HAVING - Exercise 2
    Coding exercise
    LIMIT
    LIMIT - Exercise
    Coding exercise
  • 10. SQL INSERT Statement
    14 min
    Apart from delivering the segment of the data you need from your database through the SELECT Statement, SQL also gives you the chance to manipulate your data. The Data Manipulation Language, DML, is the part of the SQL syntax that contains the commands that will allow you to do that. In this section, we will focus on the INSERT Statement, which is obviously about inserting data to a table from your database.
    14 min
    Apart from delivering the segment of the data you need from your database through the SELECT Statement, SQL also gives you the chance to manipulate your data. The Data Manipulation Language, DML, is the part of the SQL syntax that contains the commands that will allow you to do that. In this section, we will focus on the INSERT Statement, which is obviously about inserting data to a table from your database.
    The INSERT statement - Part I
    The INSERT statement - Part II
    Inserting Data INTO a New Table
    The INSERT statement - Part II - Exercise
    Practice exam
    Inserting Data INTO a New Table - Exercise
  • 11. SQL UPDATE Statement
    10 min
    Still on the subject of manipulating your data set, in this section we will focus on another DML Statement: the UPDATE Statement. Sometimes you won't need to insert new data, but you will want to correct or update some of the existing data in your database. That's why you have the UPDATE Statement, which is there just for that!
    10 min
    Still on the subject of manipulating your data set, in this section we will focus on another DML Statement: the UPDATE Statement. Sometimes you won't need to insert new data, but you will want to correct or update some of the existing data in your database. That's why you have the UPDATE Statement, which is there just for that!
    TCL's COMMIT and ROLLBACK
    The UPDATE Statement - Part I
    The UPDATE Statement - Part II
    The UPDATE Statement - Part II - Exercise
  • 12. SQL DELETE Statement
    9 min
    A bit trickier than the SQL INSERT and UPDATE Statements is the SQL DELETE Statement. Yes, it definitely is about removing information from your data set, but you must be prudent when using it. First, you risk losing data that you might actually need, and second, you shouldn't confuse it with the DROP and TRUNCATE statements. This section is devoted to clarifying all these subject matters.
    9 min
    A bit trickier than the SQL INSERT and UPDATE Statements is the SQL DELETE Statement. Yes, it definitely is about removing information from your data set, but you must be prudent when using it. First, you risk losing data that you might actually need, and second, you shouldn't confuse it with the DROP and TRUNCATE statements. This section is devoted to clarifying all these subject matters.
    The DELETE Statement - Part I
    The DELETE Statement - Part II
    The DELETE Statement - Part II - Exercise
    DROP vs TRUNCATE vs DELETE
    Exercise
  • 13. MySQL Aggregate Functions
    26 min
    Aggregate functions come in handy when we want to perform some arithmetic operations with the data in our database. The most commonly-used aggregate functions in SQL are COUNT(), SUM(), MIN(), MAX(), and AVG().
    26 min
    Aggregate functions come in handy when we want to perform some arithmetic operations with the data in our database. The most commonly-used aggregate functions in SQL are COUNT(), SUM(), MIN(), MAX(), and AVG().
    COUNT()
    COUNT() - Exercise
    Coding exercise
    SUM()
    SUM() - Exercise
    Coding exercise
    MIN() and MAX()
    MIN() and MAX() - Exercise
    Coding exercise
    Coding exercise
    AVG()
    AVG() - Exercise
    Coding exercise
    ROUND()
    ROUND() - Exercise
    Coding exercise
    COALESCE() - Preamble
    IFNULL() and COALESCE()
    Another Example of Using COALESCE()
    Another Example of Using COALESCE() - Exercise
    Exercise
    Coding exercise
    Coding exercise
  • 14. SQL JOINs
    82 min
    Joins are one of the most powerful and frequently-used tools in SQL. This is a tool you will need when combining the information from two or more tables. After completing this section, you will be able to use inner, left, right, and cross joins.
    82 min
    Joins are one of the most powerful and frequently-used tools in SQL. This is a tool you will need when combining the information from two or more tables. After completing this section, you will be able to use inner, left, right, and cross joins.
    Introduction to JOINs
    Introduction to JOINs - Exercise
    INNER JOIN - Part I
    INNER JOIN - Part II
    INNER JOIN - Part II - Exercise
    Coding exercise
    A Note on Using Joins
    Duplicate Records
    LEFT JOIN - Part I
    LEFT JOIN - Part II
    LEFT JOIN - Part II - Exercise
    Coding exercise
    RIGHT JOIN
    Coding exercise
    The new and the old join syntax
    The new and the old join syntax - Exercise
    Coding exercise
    JOIN and WHERE Used Together
    JOIN and WHERE Used Together - Exercise
    Coding exercise
    CROSS JOIN
    CROSS JOIN - Exercise
    Coding exercise
    Coding exercise
    Using Aggregate Functions with Joins
    JOIN more than two tables in SQL
    JOIN more than two tables in SQL - Exercise
    Coding exercise
    Tips and tricks for joins
    Tips and tricks for joins - Exercise
    Coding exercise
    UNION vs UNION ALL
    UNION vs UNION ALL - Exercise
    Coding exercise
  • 15. SQL Subqueries
    20 min
    Here, you will learn how to write subqueries, a key SQL tool for more advanced users. The section also includes a number of useful tips and tricks and aims to take your SQL skills to the next level.
    20 min
    Here, you will learn how to write subqueries, a key SQL tool for more advanced users. The section also includes a number of useful tips and tricks and aims to take your SQL skills to the next level.
    SQL Subqueries with IN nested inside WHERE
    SQL Subqueries with IN nested inside WHERE - Exercise
    Coding exercise
    SQL Subqueries with EXISTS-NOT EXISTS nested inside WHERE
    SQL Subqueries with EXISTS-NOT EXISTS nested inside WHERE - Exercise
    Coding exercise
    SQL Subqueries nested in SELECT and FROM
    SQL Subqueries nested in SELECT and FROM - Exercise Text
    Coding exercise
    Calculating Free-to-Paid Conversion Rate with SQL Project Free
  • 16. SQL Self Join
    8 min
    Joins are one of the most powerful and frequently-used tools in SQL. This is a tool you will need when combining the information from two or more tables. After completing this section, you will be able to use inner, left, right, and cross joins.
    8 min
    Joins are one of the most powerful and frequently-used tools in SQL. This is a tool you will need when combining the information from two or more tables. After completing this section, you will be able to use inner, left, right, and cross joins.
    SQL Self Join
    Exercise
    Coding exercise
    Coding exercise
    Coding exercise
  • 17. SQL Views
    8 min
    The focus of this part of the course is the SQL View. A view in SQL is a virtual table whose contents are obtained from an existing table or tables. Using this, SQL Tools has several advantages that will all be discussed in this lecture.
    8 min
    The focus of this part of the course is the SQL View. A view in SQL is a virtual table whose contents are obtained from an existing table or tables. Using this, SQL Tools has several advantages that will all be discussed in this lecture.
    Using SQL views
    Using SQL views - Exercise
  • 18. Stored Routines
    49 min
    Stored routines are a set of SQL statements that have been pre-written and stored on a server, allowing users to re-run them at a later stage. You will learn how to create your own stored procedures and functions.
    49 min
    Stored routines are a set of SQL statements that have been pre-written and stored on a server, allowing users to re-run them at a later stage. You will learn how to create your own stored procedures and functions.
    Introduction to Stored Routines
    Exercise
    The MySQL syntax for stored procedures
    Stored Procedures - Example - Part I
    Stored Procedures - Example - Part II
    Another Way to Create a Procedure in MySQL
    Stored Procedures - Example - Part II - Exercise
    Stored Procedures with an Input Parameter
    Stored Procedures with an Output Parameter
    Variables
    Stored Procedures with an Output Parameter - Exercise
    User-defined functions in MySQL
    Variables - Exercise
    Stored routines - conclusion
    User-defined functions in MySQL - Exercise
    Practice exam
    Exercise
  • 19. Advanced SQL Topics
    45 min
    In the last part of the training, you will learn advanced SQL topics like local variables, session variables, global variances, MySQL triggers, MySQL indexes, and the CASE Statement.
    45 min
    In the last part of the training, you will learn advanced SQL topics like local variables, session variables, global variances, MySQL triggers, MySQL indexes, and the CASE Statement.
    Types of MySQL Variables - Local Variables
    Exercise
    Session Variables
    Exercise
    Global Variables
    Exercise
    User-Defined vs System Variables
    Exercise
    MySQL Triggers - Preamble
    MySQL Triggers
    MySQL Triggers - Exercise
    MySQL Indexes
    MySQL Indexes - Exercise Text
    The CASE Statement
    The CASE Statement - Exercise Text
    Coding exercise
    Coding exercise
    Coding exercise
    Practice exam
  • 20. Course exam
    110 min
    110 min
    Course exam

Free lessons

Welcome to SQL

1.1 Welcome to SQL

4 min

Why SQL?

1.2 Why SQL?

3 min

Why MySQL?

1.4 Why MySQL?

2 min

Introduction to databases

1.6 Introduction to databases

5 min

SQL as a declarative language

2.1 SQL as a declarative language

2 min

Data definition language (DDL)

2.2 Data definition language (DDL)

4 min

Start for free

96%

of our students recommend

365 Data Science.

94%

of AI and data science graduates

successfully change

or advance their careers.

$29,000

average salary increase

after moving to an AI and data science career

ACCREDITED certificates

Craft a resume and LinkedIn profile you’re proud of—featuring certificates recognized by leading global institutions.

Earn CPE-accredited credentials that showcase your dedication, growth, and essential skills—the qualities employers value most.

  • Institute of Analytics
  • The Association of Data Scientists
  • E-Learning Quality Network
  • European Agency for Higher Education and Accreditation
  • Global Association of Online Trainers and Examiners

Certificates are included with the Self-study learning plan.

A LinkedIn profile mockup on a mobile screen showing Parker Maxwell, a Certified Data Analyst, with credentials from 365 Data Science listed under Licenses & Certification. A 365 Data Science Certificate of Achievement awarded to Parker Maxwell for completing the Data Analyst career track, featuring accreditation badges and a gold “Verified Certificate” seal.

How it WORKS

  • Lessons
  • Exercises
  • Projects
  • Practice exams
  • AI mock interviews

Lessons

Learn through short, simple lessons—no prior experience in AI or data science needed.

Try for free

Exercises

Reinforce your learning with mini recaps, hands-on coding, flashcards, fill-in-the-blank activities, and other engaging exercises.

Try for free

Projects

Tackle real-world AI and data science projects—just like those faced by industry professionals every day.

Try for free

Practice exams

Track your progress and solidify your knowledge with regular practice exams.

Try for free

AI mock interviews

Prep for interviews with real-world tasks, popular questions, and real-time feedback.

Try for free

Student REVIEWS

A collage of student testimonials from 365 Data Science learners, featuring profile photos, names, job titles, and quotes or video play icons, showcasing diverse backgrounds and successful career transitions into AI and data science roles.