Menu
Coddy logo textTech

Recap - Engineer new columns

Part of the Fundamentals section of Coddy's SQL journey — lesson 30 of 72.

challenge icon

Challenge

Easy

Available tables and columns:

  • <strong>items</strong>: <strong>id</strong>

A quartic function is defined:

f(x) = ax<sup>4</sup>+bx<sup>3</sup>+cx<sup>2</sup>+dx+e

Let's define the constant parameters:

  • a = 3
  • b = 5
  • c = 0.9
  • d = 2.2
  • e = 1

Fetch the ids and the quartic function where x is the id, and rename the column to quartic

Don't use built-in functions like POWER()!

To calculate power of 2 or power of 3 use the following example:

a*a
-- power of 2

a*a*a
-- power of 3

Try it yourself

All lessons in Fundamentals