Returns the minimum value from a column or expression. Supports numeric, string, date/time, and boolean types in BigQuery.
Same as input typeDiperbarui: 13 Jun 2026MIN(expression)A column or expression to find the minimum value of. Supports INT64, FLOAT64, STRING, DATE, TIMESTAMP, and more.
1 SELECT MIN(price) as lowest_price 2 FROM `project.dataset.products` 3 WHERE category = 'Electronics';
Finds the lowest price among electronics products.
1 SELECT 2 product_category, 3 MIN(price) as min_price, 4 MAX(price) as max_price 5 FROM `project.dataset.products` 6 GROUP BY product_category;
Finds the price range (min and max) per product category.
| product_category | min_price | max_price |
|---|---|---|
| Electronics | 99000 | 25000000 |
| Fashion | 50000 | 5000000 |
| Books | 25000 | 500000 |
1 SELECT 2 customer_id, 3 MIN(order_date) as first_order_date, 4 MAX(order_date) as last_order_date 5 FROM `project.dataset.orders` 6 GROUP BY customer_id 7 LIMIT 5;
Finds the first and last order date per customer.
| customer_id | first_order_date | last_order_date |
|---|---|---|
| C001 | 2023-01-15 | 2024-06-20 |
| C002 | 2023-03-22 | 2024-05-18 |
| C003 | 2022-11-08 | 2024-06-25 |
1 SELECT 2 MIN(STRUCT(price, product_name)) as cheapest_product 3 FROM `project.dataset.products`;
Finds the cheapest product along with its name using a STRUCT.
| cheapest_product |
|---|
| {price: 25000, product_name: "Basic Notebook"} |
Sudah paham MIN? Latih langsung di browser
Latihan interaktif, langsung di browser.