MIN() in SQL

Introduction

MIN() is an aggregate function that returns the smallest non-NULL value from an expression. Depending on the data, that can mean lowest salary, cheapest price, smallest balance, earliest order, first login, fastest response, shortest duration, or alphabetically first text under a database collation.

SELECT MIN(salary) AS minimum_salary
FROM employees;

If salaries are 50,000, 60,000, 45,000, and 70,000, the result is 45,000. The syntax is simple, but production use requires clarity about NULL, zero, negative values, dates, strings, ties, complete-row retrieval, grouping, joins, and indexes.

Basic Syntax

MIN(expression)

Most commonly, the expression is one column, but it can also be a calculation such as job duration or an intentional CASE expression. The database evaluates qualifying non-NULL values and returns the smallest according to the type's comparison rules.

A Basic Example

employee_idsalary
10150000
10265000
10345000
10480000
SELECT MIN(salary) AS lowest_salary
FROM employees;

The result is 45,000. A descriptive alias identifies the meaning of the aggregate in reports and application code.

How MIN() Works

MIN compares the qualifying expression values and retains the smallest one. It does not sort and return all rows to the client; the optimizer chooses an execution strategy based on indexes, filters, groups, and the database engine.

MIN() Ignores NULL

For salaries 50,000, NULL, 45,000, and 70,000, MIN returns 45,000. NULL is excluded because it represents missing or inapplicable information, not a known value smaller than every number.

All NULL Values and Empty Results

SELECT MIN(bonus) AS minimum_bonus
FROM employees
WHERE department = 'Unknown';

If no non-NULL bonus exists, MIN returns NULL. Replacing it with zero through COALESCE is appropriate only when zero is the required representation; no observed minimum and an actual minimum of zero are different facts.

Zero and Negative Values

Zero is a real numeric value and is included. For 10, 0, 20, and NULL, MIN returns 0. For balances 100, 50, 0, and -20, MIN returns -20 because it is numerically smallest. Minimum does not mean smallest absolute magnitude.

SELECT MIN(ABS(balance)) AS smallest_magnitude
FROM accounts;

This separate expression finds the smallest absolute value, not the lowest signed balance.

Filtering Before MIN()

SELECT MIN(salary) AS lowest_active_it_salary
FROM employees
WHERE department = 'IT'
  AND status = 'Active';

WHERE defines the population before MIN is calculated. Similar filters find the smallest completed order, cheapest active product, fastest successful request, or earliest unresolved defect.

MIN() with GROUP BY

SELECT department,
       MIN(salary) AS minimum_salary
FROM employees
GROUP BY department;

GROUP BY creates one set per department and calculates the minimum inside each set. If IT has salaries 60,000 and 80,000, its minimum is 60,000; if HR has 50,000 and 45,000, its minimum is 45,000.

Common Grouped Minimums

SELECT category_id,
       MIN(price) AS minimum_price
FROM products
WHERE active = TRUE
GROUP BY category_id;

The same pattern finds smallest order amount by customer, lowest rating by product, fastest response by endpoint, earliest order by customer, or first login by user. It returns minimum values, not automatically the complete rows containing them.

Filtering Groups with HAVING

SELECT department,
       MIN(salary) AS minimum_salary
FROM employees
WHERE status = 'Active'
GROUP BY department
HAVING MIN(salary) >= 50000;

WHERE excludes inactive rows before grouping. HAVING keeps departments whose active non-NULL salaries never fall below 50,000. If a group contains only NULL salaries, its MIN is NULL and the comparison is not true.

MIN() with Numeric Values

Numeric MIN supports salary, price, quantity, score, temperature, response time, balance, discount, and duration. Ensure the numeric type and unit match the business comparison. Comparing seconds and milliseconds in one column makes the smallest value meaningless.

MIN() with Dates and Timestamps

SELECT MIN(order_date) AS first_order_date
FROM orders;

For temporal values, the minimum is the earliest value. Common uses include earliest joining date, first order timestamp, first successful login, oldest unresolved defect creation time, and first event in a reporting period.

Earliest Date Per Entity

SELECT customer_id,
       MIN(order_date) AS first_order_date
FROM orders
GROUP BY customer_id;

One result row is returned per customer represented in orders. To include customers with no orders, start from customers and left join orders; their minimum order date will be NULL.

Date-Filtered Minimum

SELECT MIN(order_date) AS first_order_2026
FROM orders
WHERE order_date >= '2026-01-01'
  AND order_date <  '2027-01-01';

The half-open range defines the year without wrapping the indexed date column in a function. If no 2026 order exists, the result is NULL.

MIN() with Durations

The earliest start time is not the shortest duration. To find the shortest job, minimize a duration expression.

SELECT MIN(TIMESTAMPDIFF(
         SECOND,
         start_time,
         end_time
       )) AS shortest_duration_seconds
FROM jobs
WHERE end_time IS NOT NULL;

Exclude incomplete jobs or define an ongoing-duration rule. Check for invalid end times before treating a negative duration as the shortest.

Fastest Observations

SELECT endpoint,
       MIN(response_time_ms) AS fastest_response_ms
FROM api_logs
WHERE request_time >= NOW() - INTERVAL 1 HOUR
GROUP BY endpoint;

A minimum latency shows the best observed case, not typical user experience. Pair it with average, percentiles, maximum, error rate, and sample count.

MIN() with Text

SELECT MIN(employee_name) AS first_name_by_collation
FROM employees;

Many databases allow MIN over comparable character data. The result is the value considered smallest under the applicable collation, not necessarily a universal dictionary order.

Collation Controls Text Minimums

Case sensitivity, accent sensitivity, locale, normalization, character set, and punctuation ordering can change text comparison. The minimum among Alice, alice, Alvaro, and accented names may differ across collations.

Specify and test the intended collation when string order has business meaning. Do not assume text MIN results remain identical after migration.

MIN() Returns a Value, Not a Row

For products Laptop 900, Mouse 20, and Keyboard 50, MIN(price) returns 20. It does not automatically return Mouse, its identifier, category, or inventory status.

Selecting unrelated nonaggregated columns beside MIN without valid grouping can fail under standard SQL or return nondeterministic information under permissive settings.

Retrieving Every Row Tied for Minimum

SELECT *
FROM products
WHERE price = (
  SELECT MIN(price)
  FROM products
  WHERE active = TRUE
)
AND active = TRUE;

The subquery finds the minimum active price. The outer query returns all active products at that price. Repeating the same eligibility condition is essential; otherwise an inactive row can be matched against an active-product minimum.

Ties Are Valid Results

If Mouse A and Mouse B both cost 20, both are minimum-priced products. Returning both preserves the business truth. A requirement that insists on one row must define a deterministic tie-breaker.

ORDER BY and LIMIT

SELECT *
FROM products
WHERE active = TRUE
ORDER BY price ASC, product_id ASC
LIMIT 1;

This returns exactly one active product: the lowest price, then the lowest identifier among ties. LIMIT syntax varies by database. Without the secondary order, either tied row may be returned.

Choosing the Right Minimum Pattern

RequirementPattern
Minimum value onlyMIN(column)
All rows tied for minimumFilter against a MIN subquery
Exactly one minimum rowORDER BY with deterministic tie-breaker
Minimum value per groupGROUP BY with MIN
All tied minimum rows per groupGrouped MIN joined back to detail

Minimum Value Per Group

SELECT category_id,
       MIN(price) AS minimum_price
FROM products
GROUP BY category_id;

This produces one value per category. Product columns are not available because multiple products can share the minimum.

Complete Minimum Rows Per Group

SELECT p.*
FROM products p
JOIN (
  SELECT category_id,
         MIN(price) AS minimum_price
  FROM products
  WHERE active = TRUE
  GROUP BY category_id
) m
  ON m.category_id = p.category_id
 AND m.minimum_price = p.price
WHERE p.active = TRUE;

The derived table establishes one minimum value per category. Joining it to products returns all active products tied at each category minimum.

Exactly One Minimum Row Per Group

SELECT *
FROM (
  SELECT p.*,
         ROW_NUMBER() OVER (
           PARTITION BY category_id
           ORDER BY price, product_id
         ) AS rn
  FROM products p
  WHERE active = TRUE
) ranked
WHERE rn = 1;

ROW_NUMBER intentionally chooses one row using the stated tie-breaker. Use RANK or DENSE_RANK when tied minimum rows should share first place.

MIN() as a Window Function

SELECT employee_id,
       department,
       salary,
       MIN(salary) OVER (
         PARTITION BY department
       ) AS department_minimum
FROM employees;

The window form preserves each employee row and adds the departmental minimum. GROUP BY would collapse the output to one row per department.

Comparing Rows to Group Minimum

SELECT employee_id,
       department,
       salary,
       salary - MIN(salary) OVER (
         PARTITION BY department
       ) AS amount_above_minimum
FROM employees;

This quantifies distance from the group minimum. Rows with NULL salary produce NULL differences and do not define the minimum.

Identifying Every Group-Minimum Row

SELECT *
FROM (
  SELECT e.*,
         MIN(salary) OVER (
           PARTITION BY department
         ) AS department_minimum
  FROM employees e
) compared
WHERE salary = department_minimum;

All ties are retained. This form can be easier to extend with additional window metrics than a grouped join-back.

Running Minimum

SELECT price_time,
       price,
       MIN(price) OVER (
         ORDER BY price_time, price_event_id
         ROWS BETWEEN UNBOUNDED PRECEDING
                  AND CURRENT ROW
       ) AS running_minimum
FROM price_history;

A running minimum can stay unchanged or decrease as rows are added; it cannot increase. The tie-breaker makes row order deterministic.

Moving Minimum

SELECT measurement_time,
       value,
       MIN(value) OVER (
         ORDER BY measurement_time
         ROWS BETWEEN 4 PRECEDING AND CURRENT ROW
       ) AS moving_minimum
FROM measurements;

This is the minimum of five rows, not necessarily five minutes or five calendar dates. Use time-based bucketing or an appropriate range design when the requirement is duration-based.

Conditional MIN()

SELECT MIN(CASE
         WHEN status = 'Completed' THEN total_amount
       END) AS smallest_completed_order,
       MIN(CASE
         WHEN status = 'Pending' THEN total_amount
       END) AS smallest_pending_order
FROM orders;

Nonmatching rows produce NULL and are ignored. Conditional aggregation creates several related minima from one input scan.

First Successful Event

SELECT user_id,
       MIN(CASE
         WHEN event_status = 'SUCCESS' THEN event_time
       END) AS first_success_time
FROM events
GROUP BY user_id;

Users without a successful event receive NULL. This pattern supports first purchase, first completed order, first successful login, or first passing test.

Earliest and Latest Together

SELECT customer_id,
       MIN(order_date) AS first_order,
       MAX(order_date) AS latest_order,
       DATEDIFF(
         MAX(order_date),
         MIN(order_date)
       ) AS activity_span_days
FROM orders
GROUP BY customer_id;

The pair describes the observed activity range. A customer with one order has a span of zero days, not necessarily a zero-length customer relationship.

Outer Joins and Empty Groups

SELECT c.category_id,
       MIN(p.price) AS minimum_price
FROM categories c
LEFT JOIN products p
  ON p.category_id = c.category_id
 AND p.active = TRUE
GROUP BY c.category_id;

Every category appears. Categories without active products have NULL minimum price. Moving the active condition to WHERE would remove those preserved categories and change the report population.

Duplicates and DISTINCT

Duplicate copies of the same value do not change a minimum. For 10, 10, 20, and 30, both MIN(value) and MIN(DISTINCT value) return 10. DISTINCT is therefore normally unnecessary and can obscure intent.

Join Multiplication

Repeated copies of the same minimum value may not change MIN, but joins can still introduce different values from unintended rows or alter the eligible population. Verify join conditions and result grain even when duplication appears harmless.

MIN(id) Is Not Necessarily the Oldest Row

An identifier can be imported, generated out of order, allocated in batches, or unrelated to event time. Use MIN(created_at) when the requirement is earliest creation. Use MIN(id) only when the data contract guarantees that identifier order represents the required chronology.

COALESCE Before MIN Can Change Meaning

For salaries 50,000, NULL, and 60,000, MIN(salary) returns 50,000. MIN(COALESCE(salary, 0)) returns zero. That is correct only if missing salary is defined as zero; otherwise it creates a false minimum.

Units and Currency

The smallest value is meaningful only among compatible units. A response-time column mixing seconds and milliseconds or a payment set mixing currencies cannot produce a valid minimum without normalization. Group by unit or convert values using a governed rule.

Time Zones and Earliest Events

When timestamps represent instants, compare them under a consistent storage convention such as UTC. Formatting or converting to local time can change displayed dates but not the global order of valid instants. Local date-only events require a separate calendar interpretation.

MIN() and Lexicographic Tuples

A business definition of "first" often needs more than one ordering column. Two events can share the same timestamp, so the true deterministic order may be event time followed by event identifier. MIN(timestamp) alone identifies the earliest time but does not resolve which event is first among ties.

SELECT *
FROM events
WHERE user_id = :user_id
ORDER BY event_time, event_id
LIMIT 1;

This ordered-row pattern handles the composite rule directly. Database-specific tuple functions exist, but explicit ORDER BY is generally clearer when returning a complete row.

Minimum Row with NOT EXISTS

A correlated anti-join can return rows for which no smaller eligible row exists.

SELECT p.*
FROM products p
WHERE p.active = TRUE
  AND NOT EXISTS (
    SELECT 1
    FROM products p2
    WHERE p2.active = TRUE
      AND p2.category_id = p.category_id
      AND p2.price < p.price
  );

This returns all active products tied for the lowest price in each category. The grouped MIN join-back and window approaches are often easier to recognize, but understanding the anti-join clarifies the logical meaning: no smaller peer exists.

Minimum Row with Lateral or APPLY

Some databases support lateral joins or APPLY, allowing a top-one ordered lookup for each parent. The exact syntax varies, but the concept is useful for retrieving one earliest order per customer with a deterministic tie-breaker.

SELECT c.customer_id,
       first_order.order_id,
       first_order.order_date
FROM customers c
LEFT JOIN LATERAL (
  SELECT o.order_id, o.order_date
  FROM orders o
  WHERE o.customer_id = c.customer_id
  ORDER BY o.order_date, o.order_id
  FETCH FIRST 1 ROW ONLY
) first_order ON TRUE;

Use syntax supported by the target DBMS. An index on the parent key and ordering columns can make this pattern efficient.

First and Second Values

MIN returns only the smallest value. Requirements such as second-lowest price, first two events, or nth earliest order need ranking or ordered-offset logic.

SELECT *
FROM (
  SELECT p.*,
         DENSE_RANK() OVER (
           PARTITION BY category_id
           ORDER BY price
         ) AS price_rank
  FROM products p
) ranked
WHERE price_rank <= 2;

DENSE_RANK preserves price ties and returns the two lowest distinct price levels per category. ROW_NUMBER would instead select a fixed number of rows.

Earliest Effective Record

Versioned tables often store effective periods. The earliest record can mean the smallest effective start, but the currently applicable record requires interval filtering rather than MIN.

SELECT *
FROM price_version
WHERE product_id = :product_id
  AND effective_start <= :as_of_time
  AND (effective_end > :as_of_time
       OR effective_end IS NULL)
ORDER BY effective_start DESC, version_id DESC
LIMIT 1;

The current version is the latest eligible start, not the global minimum start. Temporal wording must be translated carefully.

First Event After a Threshold

SELECT MIN(event_time) AS first_event_after_cutoff
FROM events
WHERE event_time >= :cutoff_time
  AND event_type = :event_type;

This is useful for first login after reset, first order after a campaign, or first error after deployment. Include tenant, user, environment, and status filters that define the event population.

First Event Before a Threshold

The nearest event before a cutoff is not MIN; it is the maximum eligible timestamp before the cutoff.

SELECT MAX(event_time) AS last_event_before_cutoff
FROM events
WHERE event_time < :cutoff_time;

This contrast prevents a common semantic error. MIN means earliest among eligible rows, while "closest before" means latest among rows before a boundary.

Minimum Change from a Baseline

Sometimes the requirement is the smallest difference rather than the smallest raw value.

SELECT MIN(ABS(measured_value - target_value))
       AS closest_distance_to_target
FROM measurements;

This returns only the minimum distance. To retrieve every closest measurement, compute or join the distance at one consistent grain and filter against its minimum. If direction matters, do not use ABS.

Minimum Positive Value

When zero and negative values are valid but the requirement is the smallest positive amount, express that eligibility condition directly.

SELECT MIN(balance) AS smallest_positive_balance
FROM accounts
WHERE balance > 0;

Replacing nonpositive values with NULL through CASE can also work in conditional aggregation, but WHERE is clearer for one metric.

Minimum Nonzero Value

SELECT MIN(NULLIF(quantity, 0)) AS smallest_nonzero_quantity
FROM inventory;

NULLIF converts zero to NULL, which MIN ignores. This compact expression is valid only when zero should be excluded and existing NULL values already mean missing. A WHERE condition may be easier to understand and optimize.

Data-Quality Checks with MIN()

Minimum values can reveal impossible or suspicious data. A negative minimum quantity may indicate inventory corruption; a timestamp before system launch may reveal migration errors; a rating below the allowed range may show validation failure.

SELECT MIN(quantity) AS minimum_quantity,
       MIN(rating) AS minimum_rating,
       MIN(created_at) AS earliest_record
FROM imported_data;

MIN is a quick profile, not a substitute for constraints. Use CHECK constraints and typed validation to prevent invalid data at write time.

Monitoring with Minimum Latency

A very low minimum response time can confirm that an endpoint is capable of fast execution, but it says little about consistency. Cache hits, health checks, or tiny responses can dominate the best case.

Segment by endpoint, operation, status, payload class, region, and cache state where relevant. Report count, median, percentiles, and maximum alongside MIN to avoid presenting an exceptional fast request as normal performance.

Minimum Threshold Alerts

Some monitoring rules alert when a value falls below an expected floor, such as battery voltage, inventory level, temperature, or account reserve.

SELECT device_id,
       MIN(measured_value) AS period_minimum
FROM measurements
WHERE measured_at >= :period_start
  AND measured_at <  :period_end
GROUP BY device_id
HAVING MIN(measured_value) < :alert_floor;

Confirm sensor quality and unit normalization before using the minimum for an operational alert.

Security and Tenant Scope

Minimum queries must apply row-level access and tenant filters before aggregation. Even a single aggregate value can reveal sensitive information such as the lowest salary or earliest confidential event.

SELECT MIN(salary) AS tenant_minimum_salary
FROM employees
WHERE tenant_id = :tenant_id
  AND department_id IN (:authorized_departments);

Cached and precomputed minima must use the same security scope. Small groups may require suppression under privacy policy.

Concurrency and Selecting a Minimum Work Item

Finding the earliest queued job and then updating it in a separate statement can let multiple workers claim the same row. MIN identifies a candidate but does not reserve it.

Use a transaction, supported row-locking pattern, atomic status transition, or queue mechanism. The exact syntax differs by database. Correct concurrency is part of the workflow, not something the aggregate guarantees.

Partitioned Tables

On date-partitioned tables, a date predicate can let the optimizer prune irrelevant partitions before calculating MIN. An unbounded global minimum may need to inspect metadata or indexes across every partition.

Do not assume partitioning makes all minima fast. Verify plans, partition constraints, local versus global indexes, and maintenance behavior.

Precomputed Minimums

Historical dashboards may store daily or hourly minima. A higher-level minimum can be rolled up correctly as the MIN of lower-level minima, provided every lower-level summary uses compatible units, filters, and population rules.

Unlike averages, a minimum needs no contributing count for mathematical roll-up, but metadata is still required to identify when and where the value occurred and whether the period had data.

Late and Corrected Data

A late-arriving smaller value must update every affected higher-level summary. Deleting or correcting the row that supplied a stored minimum is harder because the next-smallest value must be rediscovered from detail or a richer data structure.

Summary pipelines need a lookback, change-data capture, or targeted recomputation strategy and periodic reconciliation to source rows.

Auditability of Extreme Values

For important minimums, retain the source identifier, observed value, timestamp, unit, filters, time zone, snapshot, and query version. A minimum value without the row that produced it can be difficult to investigate.

MIN() Performance

Performance depends on indexes, filters, grouping, joins, table size, partitioning, transaction visibility, and the execution plan. Some databases can locate an unfiltered indexed minimum from the beginning of an index without scanning every row.

Filtered and grouped minima require index layouts that match access patterns. Always inspect EXPLAIN rather than assuming MIN is instant.

Composite Index for a Filtered Minimum

SELECT MIN(order_date)
FROM orders
WHERE customer_id = 101;

A composite index beginning with customer_id and followed by order_date may help locate the customer's earliest order efficiently. Suitability depends on the DBMS, data distribution, and broader workload.

Transaction Visibility

MIN returns the smallest value visible to the current transaction under its isolation level. Concurrent inserts and uncommitted rows can make sessions observe different minima. Reports requiring reproducibility should identify a snapshot or cutoff.

Text and Date Portability

Numeric and date MIN are broadly portable, but collations, timestamp types, time-zone behavior, NULL ordering in ORDER BY alternatives, LIMIT syntax, and window support vary. Test migration behavior rather than translating syntax mechanically.

Real-World Dashboard Summary

SELECT COUNT(*) AS total_orders,
       SUM(total_amount) AS revenue,
       AVG(total_amount) AS average_order,
       MIN(total_amount) AS smallest_order,
       MAX(total_amount) AS largest_order
FROM orders
WHERE status = 'Completed'
  AND order_date >= :period_start
  AND order_date <  :period_end;

All metrics share one population. If amount can be NULL, COUNT(*) and the expression aggregates have different contributing counts, so include a data-quality metric when necessary.

Common Mistakes

  1. Expecting MIN to return the complete row containing the value.
  2. Selecting unrelated columns beside MIN without valid grouping.
  3. Using MIN(id) as a substitute for earliest timestamp.
  4. Minimizing a start date when the requirement is shortest duration.
  5. Treating NULL as smaller than zero.
  6. Replacing NULL with zero before MIN without a business rule.
  7. Ignoring negative values.
  8. Using smallest absolute value when the requirement is lowest signed value.
  9. Returning one tied row without a deterministic tie-breaker.
  10. Using incompatible units, currencies, or time semantics.
  11. Assuming text order is independent of collation.
  12. Ignoring population changes introduced by joins and filters.

Testing MIN Queries

Test empty input, all-NULL input, zero, negative values, duplicates, ties, extreme values, text case and accents, date boundaries, and fractional timestamps. For complete-row queries, verify whether every tie or exactly one deterministic row is required.

For grouped minima, include empty categories through an outer join. For windows, test partition boundaries, tied ordering values, and frame edges. Confirm execution plans with realistic row counts and indexes.

Production Checklist

  1. Define exactly what should be minimized.
  2. Use the expression that represents that business quantity.
  3. Distinguish the minimum value from its complete row.
  4. Decide whether ties must be preserved.
  5. Provide a deterministic tie-breaker when one row is required.
  6. Confirm NULL, zero, and negative-value semantics.
  7. Normalize units, currencies, collations, and time conventions.
  8. Use GROUP BY for one minimum per category.
  9. Restore correct grain after joins.
  10. Use explicit frames for running and moving minima.
  11. Validate indexes and plans for important queries.
  12. Record report filters, cutoff, and snapshot.

Interview Questions and Answers

What is MIN()? It is an aggregate function that returns the smallest non-NULL expression value.

Does MIN ignore NULL? Yes. If no non-NULL value exists, the result is NULL.

Can MIN work with dates? Yes; it returns the earliest non-NULL date or timestamp.

Can MIN work with strings? In many databases, yes, according to the applicable collation.

How do you return all rows tied for the minimum? Filter detail rows against a MIN subquery using the same eligibility conditions.

How do you find a minimum per group? GROUP BY the category and apply MIN to each group.

MIN versus ORDER BY LIMIT? MIN returns a value; ordered LIMIT returns one row and requires a tie policy.

Why is DISTINCT usually unnecessary? Duplicate equal values do not change the minimum.

How do you calculate a running minimum? Use MIN as an ordered window function with an explicit frame.

Mental Model

For prices 50, 20, NULL, 100, and 35, the non-NULL values are 50, 20, 100, and 35. COUNT(price) is 4, SUM(price) is 205, AVG(price) is 51.25, MIN(price) is 20, and MAX(price) is 100.

FunctionQuestionResult
COUNT()How many known values?4
SUM()What is the total?205
AVG()What is the average?51.25
MIN()What is the smallest?20
MAX()What is the largest?100

Key Takeaway

MIN() answers "what is the smallest, lowest, fastest, or earliest non-NULL value?" It can operate globally, per group, conditionally, or over a window.

RELIABLE MINIMUM = CORRECT EXPRESSION
                   + DEFINED POPULATION
                   + NULL AWARENESS
                   + COMPATIBLE COMPARISON RULES
                   + EXPLICIT TIE POLICY
                   + CORRECT RESULT GRAIN
                   + DETERMINISTIC ORDERING
                   + VERIFIED INDEX PLAN

Use MIN directly when only the value is needed, a subquery or rank when complete rows are required, GROUP BY for category minima, and window MIN for row-level comparisons and running analysis. Always minimize the expression that represents the actual business question.