MIN

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the minimum value of an expression across all input values.

Syntax 

1min(<expression>)

Arguments 

Required 

  • <expression>: An expression of any comparable type.

Returns 

Returns the same type as the argument. Returns NULL if no rows are selected.

Considerations 

  • NULL values are ignored in the calculation.
  • Works with numeric types, strings, dates, and other comparable types.
  • For strings, returns the lexicographically smallest value.

Examples 

Find Minimum Value 

Get the lowest price.

1SELECT min(price) AS lowest_price
2FROM products;

Minimum by Group 

Find the minimum value per group.

1SELECT category, min(price) AS min_price
2FROM products
3GROUP BY category;

Minimum Date 

Find the earliest date.

1SELECT min(order_date) AS first_order
2FROM orders;

Related Documentation