Course

Advanced

Recursive Queries

Master the most challenging type of SQL queries. Learn how to process trees and graphs in SQL, and how to effectively organize long SQL queries.

Table of contents

11 free interactive coding challenges

Lifetime access

B042DDD8-A1C9-4053-8AF3-463EB31543B8@2x

limited to this course only

$39

Buy now

Want a better deal?

B042DDD8-A1C9-4053-8AF3-463EB31543B8@2x

Get unlimited lifetime access to all 68 present and future courses

Save $450

Unlimited lifetime access

B042DDD8-A1C9-4053-8AF3-463EB31543B8@2x

to all 68 present and future courses

$149

$599

75% OFF

Buy now
Details
114

Interactive exercises

18 h

Estimated time

11706

Users enrolled

☆☆☆☆☆
★★★★★

891 ratings

Description

Common Table Expressions (CTEs), often simply called WITH clauses, are essentially just named subqueries. They are a fairly new feature of SQL; with CTEs, you can break a long query into smaller chunks, which makes it more readable. Unlike SQL subqueries, CTEs can be recursive, allowing the traversal of hierarchical models of enormous depth.

About the Common Table Expressions in SQL Course
This course will cover 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.

SQL keywords and database icons floating

This course is intended for intermediate users. We assume the user knows 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

What Are the Requirements?

  • A web browser
  • 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
  • Split long SQL queries with simple and nested CTEs
  • Deploy recursive CTEs
  • Write recursive CTEs that traverse a hierarchical data model

Who Should Take This Course?

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

Table of contents

Free

Paid content

0%

Course progress

0/114

Exercises completed

1.

Intro Quiz

Test your knowledge of SQL

0/14

Introduction

Quiz

Congratulations

2.

CTE syntax

Your first encounter with Common Table Expressions

0/17

Introduction

Basic CTE

Summary

3.

Nested CTE

You'll get to know how to use nested CTEs

0/15

Introduction

Nested CTEs

Summary

4.

Recursive CTE

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

0/36

Introduction

The very basics

Infinite looping

Processing trees with recursive CTE

Processing graphs with recursive CTE

Summary

5.

CTE with INSERT, DELETE, UPDATE

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

0/18

Introduction

CTEs with data modifying statements

Summary

6.

Final quiz

Test your knowledge in this final quiz

0/14

Introduction

Quiz

Summary

Reviews (2)

Average rating

4.83/5

☆☆☆☆☆
★★★★★

891 ratings

Details

5 stars

84%

4 stars

16%

3 stars

0%

2 stars

0%

1 stars

0%