Saltar al contenido principal
InicioSQLHierarchical and Recursive Queries in SQL Server

# Hierarchical and Recursive Queries in SQL Server

Learn how to write recursive queries and query hierarchical data structures.

Comience El Curso Gratis
4 Horas13 Videos47 Ejercicios
10.040 AprendicesDeclaración de cumplimiento

## Crea Tu Cuenta Gratuita

o

Al continuar, acepta nuestros Términos de uso, nuestra Política de privacidad y que sus datos se almacenan en los EE. UU.
¿Entrenar a 2 o más personas?Pruebe DataCamp para empresas

## Descripción del curso

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.
Empresas

### .css-1goj2uy{margin-right:8px;}Group.css-gnv7tt{font-size:20px;font-weight:700;white-space:nowrap;}.css-12nwtlk{box-sizing:border-box;margin:0;min-width:0;color:#05192D;font-size:16px;line-height:1.5;font-size:20px;font-weight:700;white-space:nowrap;}¿Entrenar a 2 o más personas?

Obtenga acceso de su equipo a la biblioteca completa de DataCamp, con informes centralizados, tareas, proyectos y más
Pruebe DataCamp Para EmpresasPara obtener una solución a medida, reserve una demostración.
1. 1

### Recursion and Common Table Expression (CTE)

Gratuito

In this chapter, you will learn about recursion and why it is beneficial to apply this technique. You will also refresh your knowledge about Common Expression Tables (CTE).

Reproducir Capítulo Ahora
Recap of Common Table Expressions (CTE)
50 xp
What is a CTE?
50 xp
A CTE for IT-positions
100 xp
A CTE for high-paid IT-positions
100 xp
Introduction to recursion
50 xp
50 xp
Calculate the factorial of 5
100 xp
How to query the factorial of 6 recursively
100 xp
Solve recursive maths problems
50 xp
Counting numbers recursively
100 xp
Calculate the sum of potencies
100 xp
2. 2

### Hierarchical and Recursive Queries

In this chapter, you will learn about recursive CTEs, how to query hierarchical datasets, and finally, how to apply recursive CTEs on hierarchical data.

3. 3

### Creating Data Models on Your Own

In this chapter, you will learn how to create and modify database tables. You will learn about relational and hierarchical data models, how they differ, and when each model should be used.

4. 4

### Hierarchical Queries of Real-World Examples

In this chapter, you will practice your learnings about hierarchical and recursive querying on real-world problems, such as finding possible flight routes, assembling a car, and modeling a power grid.

Empresas

### Group¿Entrenar a 2 o más personas?

Obtenga acceso de su equipo a la biblioteca completa de DataCamp, con informes centralizados, tareas, proyectos y más

Sets De Datos

Power grid dataEmployee dataDepartment dataSalary dataBill of materials products dataBill of materials dataFlights data

Jasmin Ludolf

Data Science Content Developer, DataCamp

Ver Mas