Only this week, get the SQL Complete Track of 9 courses in a special prize of $330 $89!
The very basics
Infinite looping
Processing trees with recursive CTEs
Processing graphs with recursive ctes


Excellent. Let's do an additional exercise to practice.


Create a recursive query that will show three columns:

  • Numeven numbers from 2 to 20 (inclusively),
  • NumPlusPrev – the current even number plus the previous even number,
  • NumSquare – the current even number squared.

Stuck? Here's a hint!

In order to get squared values, you may multiply the value by itself.