Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
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.