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
1,514 learners enrolled
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
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! 😉
Table of contents
Course progress 0%
Exercises completed 0/114
-
Test your knowledge of SQL.
-
Your first encounter with Common Table Expressions
-
You'll get to know how to use nested CTEs
-
You'll find out what recursion is and how to use it in SQL queries
-
You'll get to know how to use INSERT, DELETE, UPDATE statements with CTEs
-
Test your knowledge in this final quiz
Get the Certificate of Competency in SQL
This certificate will confirm your practical SQL problem-solving skills