Advanced Course

Recursive Queries in MySQL 8

Do you want to be able to process trees and graphs in MySQL? Are you using MySQL 8 or higher? Learn how to write recursive queries and you’ll soon be producing concise and powerful SQL queries!

4.75 ★★★★★ ★★★★★ (316 ratings)

1,501 learners enrolled

Lifetime access

limited to this course only

$39

Want a better deal?

Get unlimited lifetime access to all 71 present and future courses

Save $450

Unlimited lifetime access

to all 71 present and future courses

$149 $599

75% OFF

Free trial Yes

Certificate of completion Yes

Time to complete 18 h

Coding challenges 114

Skills you will gain

  • Understand and use basic Common Table Expressions in MySQL 8 and up
  • Organize long SQL queries using simple and nested CTEs (MySQL 8 and up)
  • Use recursive CTEs
  • Write recursive CTEs that traverse a hierarchical data model

Last reviews

Table of contents

Course progress 0%

Exercises completed 0/114

  1. Intro Quiz

    0/13

    Test your knowledge of SQL.

  2. CTE syntax

    0/17

    Your first encounter with Common Table Expressions

  3. Nested CTE

    0/15

    You'll get to know how to use nested CTEs

  4. Recursive CTE

    0/37

    You'll find out what recursion is and how to use it in SQL queries

  5. CTE with INSERT, DELETE, UPDATE

    0/18

    You'll get to know how to use INSERT, DELETE, UPDATE statements with CTEs

  6. Final quiz

    0/14

    Test your knowledge in this final quiz

Get the Certificate of Competency in SQL

This certificate will confirm your practical SQL problem-solving skills

Description

This interactive online MySQL course will teach you how to use Common Table Expressions (CTEs) and recursive queries in MySQL 8 and up. If you are serious about working with databases and becoming a SQL expert, you need to know these features.

Recursive SQL queries let you process hierarchical structures (such as management hierarchies, family trees, or road connection graphs) in SQL. When you understand recursion, you can easily work with trees and graphs stored in a MySQL database.

CTEs (Common Table Expressions, also known as WITH queries), are essentially named subqueries. They let you organize your SQL query and name parts of it; this makes your work clearer and more readable. CTEs also let you organize computations into multiple phases, which makes long queries more understandable.

Common Table Expressions and recursive queries were introduced to MySQL in 2018; they are now available in version 8.0 and higher. After completing this online MySQL course, you will be able to use the acquired knowledge in work with other SQL databases; just check minor syntax differences in your database’s documentation.

This course covers simple CTEs, nested CTEs, and recursive CTEs. You will learn how to manage your SQL queries with CTEs, how and when to nest CTEs, and how to use recursive CTEs to move through hierarchical data models.

The course is interactive. You practice by writing real SQL code and solving exercises directly in your web browser. Our online platform runs your code and verifies your solution. You don't need to install any software on your computer.

This course is intended for intermediate users. We assume that you know the basics of SQL, including:

  • How to select from a single table, including writing complex WHERE conditions
  • How to JOIN tables
  • How GROUP BY and HAVING work
  • How SQL subqueries work

If you are new to MySQL, start with our SQL Basics in MySQL course and come back to this course when you’re comfortable with those concepts.

What Do You Need to Take This Course?

  • A web browser and an Internet connection
  • Knowledge of basic SQL, including JOINs and GROUP BY clauses

What Am I Going To Get from This SQL Course?

You will discover how to:

  • Understand and use basic Common Table Expressions in MySQL 8 and up
  • Organize long SQL queries using simple and nested CTEs (MySQL 8 and up)
  • Use recursive CTEs
  • Write recursive CTEs that traverse a hierarchical data model

Who Should Take This Course?

  • Beginning database analysts who use MySQL
  • Developers who want to keep their knowledge of MySQL current
  • Students taking classes in relational databases using MySQL 8
  • Anyone who wants to learn Common Table Expressions in MySQL

What's In It for Me?

  • 114 interactive exercises. Learn at your own pace, from anywhere and at any time. Interactive, hands-on learning improves retention.
  • Lifetime access to the course. When you purchase the course, you’ll get instant personal access to all of its content.
  • Certificate of completion. After you successfully finish all of the exercises, you’ll get a downloadable PDF certificate to showcase your accomplishment.
  • 30-day money-back guarantee. If you’re not satisfied with the quality of the course, you can get a refund within 30 days of your purchase.
  • Hints and help. There are hints available in the exercises to help you if you get stuck. You can also ask our learning community for help through the Disqus tab. Or drop the course creators a line – we’ll be more than happy to answer! 😉

Reviews (0)

Average rating

4.75/5

★★★★★ ★★★★★ (316 ratings)

5 stars

76%

4 stars

24%

3 stars

0%

2 stars

0%

1 stars

0%