Click here to navigate the course.

Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Query Results

Run a query to see results.

Database Schema

Schema undefined.
Code Editor

Great work! Numeric functions can be used to transform numbers. Some common SQLite mathematical functions are included below that take numeric data types as inputs:

  • SELECT (number1 + number2);: Returns the sum of two numbers. Similar, SQL can be used for subtraction, multiplication, and division.
  • SELECT CAST(number1 AS REAL) / number3;: Returns the result as a real number by casting one of the values as a real number, rather than an integer.
  • SELECT ROUND(number, precision);: Returns the numeric value rounded off to the next value specified.

In our baked_goods table, we have information about cost designated by ingredients_cost. For accounting purposes, we'd like to make sure that each ingredient cost is rounded to four decimal places rather than two, to account for currency fluctuations.

SELECT ROUND(ingredients_cost, 4) as rounded_cost FROM baked_goods;
report a_bug
If you see a bug or any other issue with this page, please report it here.