greatest
Returns the largest of the provided values.
Examples:
examples.sql
least
Returns the smallest of the provided values.
Examples:
examples.sql
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
SDF is now a part of dbt Labs. Get live CTA previews, inline errors, and mesh support natively in the dbt platform. Learn more ยท Migrate to Fusion
greatestSELECT greatest(1, 2, 3) AS value; -- value '3'
function greatest($3, ...) returns $3
leastSELECT LEAST(5,6,7,1,2,3,4) -- list of columns or values -- value '1'
function least($3, ...) returns $3