CEILING(number) rounds up to the nearest integer of equal or greater value: 2.1 becomes 3, -2.5 becomes -2, and a whole number stays put. DuckDB writes it ceil() (or ceiling()). The hand-rolled trunc(x) + 1 is wrong twice: it lifts whole numbers (16 becomes 17) and pushes negatives up too far.
Updated · Checked on the xmetric engine
What is the syntax?
CEILING(number)
number
a number or a numeric expression.
Returns an integer: the smallest whole number not below the input. Null if the input is null.
What does it return, and what is the SQL?
Each example runs on the same 8 sample rows twice: the Tableau formula on the xmetric engine, and the SQL in DuckDB.