SQL · Pattern 3 — Built-in Functions
Numeric Functions
Numeric functions do math on numbers — ROUND(), CEIL()/FLOOR(), ABS(), POWER().
Source data — Pattern 3: Built-in Functions
All queries run against the shared employees table (see schema.sql). This pattern needs two columns not used before: hire_date (topic 17) and bonus, nullable (topics 19–20).

What it does
Numeric functions do math on numbers — ROUND(), CEIL()/FLOOR(), ABS(), POWER(). ROUND(value, -3) rounds to the nearest thousand: a negative second argument rounds to the left of the decimal point instead of the right.
Problem
Round salaries to the nearest thousand.
SELECT first_name,
salary,
ROUND(salary, -3) AS salary_rounded
FROM employees;
Result
