Skip to main content
HomeSQL

Course

Hierarchical and Recursive Queries in SQL Server

Advanced
4.7+
23 reviews
Updated 05/2025
Learn how to write recursive queries and query hierarchical data structures.
Start Course for Free

Included withPremium or Teams

SQLProgramming4 hours13 videos47 Exercises3,800 XP11,210Statement of Accomplishment

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
Group

Training 2 or more people?

Try DataCamp for Business

Loved by learners at thousands of companies

Course Description

Do you want to query complex data structures in an iterative way? Do you have access to hierarchical data structures that need to be queried? This course will teach you the tools required to solve these questions. You will learn how to write recursive queries and query hierarchical data structures. To do this, you will use Common Table Expressions (CTE) and the recursion principle on a wide variety of datasets. You will, for example, dig into a flight plan dataset and learn how to find the best and cheapest connection between two airports. After completing this course, you will understand the principle of recursion, and be able to identify and create hierarchical data models.

Prerequisites

Functions for Manipulating Data in SQL Server
1

Recursion and Common Table Expression (CTE)

Start Chapter
2

Hierarchical and Recursive Queries

Start Chapter
3

Creating Data Models on Your Own

Start Chapter
4

Hierarchical Queries of Real-World Examples

Start Chapter
Hierarchical and Recursive Queries in SQL Server
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review

Included withPremium or Teams

Enroll now

Don’t just take our word for it

*4.7
from 23 reviews
78%
22%
0%
0%
0%
  • Isaac
    11 days

  • Ahmed
    12 days

    GREATE AS USUAL FRO DATACAMP

  • Anh
    18 days

  • Jim
    21 days

  • Fuad
    25 days

    Helpful, informative.

  • Bongiwe
    26 days

    Very informative course, l enjoyed it

Isaac

"GREATE AS USUAL FRO DATACAMP"

Ahmed

Anh

FAQs

Join over 16 million learners and start Hierarchical and Recursive Queries in SQL Server today!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.