It's Autumn! Prices fall like leaves! - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
The very basics
8. Basic recursion: exercise
Infinite looping
Processing graphs with recursive CTEs
Summary

Instruction

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

Exercise

Create a recursive query that will show three columns:

  • numEven numbers from 2 to 20.
  • num_plus_prev – The sum of the current and the previous number.
  • num_square – The current number squared.

Stuck? Here's a hint!

To get squared values, multiply the value by itself.