MIN

Returns the minimum value among the non-NULL input expressions.

Syntax

MIN(expression any primitive) → same as input

  • expression: Input expression.

Examples

Aggregate function example
SELECT MIN("total_gas_used") 
FROM eth.recent_blocks

-- EXPR$0
-- -1430.0

MIN(expression any primitive) → same as input

  • expression: Input expression.

Examples

Window function example
SELECT "transaction_count", 
  MIN("total_gas_used") OVER(PARTITION BY "transaction_count") "min_total_gas_used"
FROM eth.recent_blocks
LIMIT 1

-- trip_distance_mi, min_total_amount
-- 0.06, -52.5

Usage Notes

For information about the data types that are supported in Spice, see Data Types.

Last updated