You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Point people at GREATEST if looking for max of a set of values inline
Fix formatting and add reference to GREATEST function
Fix link formatting for OVER clause in MAX function
Fix grammar in MAX function documentation
Corrected grammatical errors for clarity.
Clarify MIN function description and add LEAST reference
Updated the description of the MIN function to clarify its behavior and added a reference to the LEAST function for inline minimum values.
Update min-transact-sql.md
Fix link to OVER clause in MAX function documentation
Returns the maximum of all values of the specified expression in a group. May be followed by the [OVER clause](../../t-sql/queries/select-over-clause-transact-sql.md)
25
+
If you want the maximum of all values of multiple expressions inline then look at [GREATEST](logical-functions-greatest-transact-sql.md)
@@ -49,7 +50,7 @@ MAX ([ ALL ] expression) OVER ( <partition_by_clause> [ <order_by_clause> ] )
49
50
50
51
OVER **(**_partition\_by\_clause_[_order\_by\_clause_]**)**
51
52
*partition_by_clause* divides the result set produced by the FROM clause into partitions to which the function is applied. If not specified, the function treats all rows of the query result set as a single group. *order_by_clause* determines the logical order in which the operation is performed. *_partition\_by\_clause_* is required. For more information, see [OVER Clause (Transact-SQL)](../../t-sql/queries/select-over-clause-transact-sql.md).
52
-
53
+
53
54
## Return Types
54
55
Returns a value same as *expression*.
55
56
@@ -61,6 +62,8 @@ MAX ([ ALL ] expression) OVER ( <partition_by_clause> [ <order_by_clause> ] )
61
62
For character columns, MAX finds the highest value in the collating sequence.
62
63
63
64
MAX is a deterministic function when used without the OVER and ORDER BY clauses. It is nondeterministic when specified with the OVER and ORDER BY clauses. For more information, see [Deterministic and Nondeterministic Functions](../../relational-databases/user-defined-functions/deterministic-and-nondeterministic-functions.md).
65
+
66
+
Operates on a set of rows. To obtain the MAX value for a set of values inline, then look at [GREATEST](logical-functions-greatest-transact-sql.md)
64
67
65
68
## Examples
66
69
@@ -135,6 +138,7 @@ The last system database is `tempdb`.
Returns the minimum value in the expression. May be followed by the [OVER clause](../../t-sql/queries/select-over-clause-transact-sql.md).
24
+
Returns the minimum of all values of the specified expression in a group. May be followed by the [OVER clause](../../t-sql/queries/select-over-clause-transact-sql.md)
25
+
If you want the minimum of all values of multiple expressions inline then look at [LEAST](logical-functions-least-transact-sql.md)
@@ -59,6 +60,8 @@ MIN ( [ ALL ] expression ) OVER ( [ <partition_by_clause> ] [ <order_by_clause>
59
60
With character data columns, MIN finds the value that is lowest in the sort sequence.
60
61
61
62
MIN is a deterministic function when used without the OVER and ORDER BY clauses. It is nondeterministic when specified with the OVER and ORDER BY clauses. For more information, see [Deterministic and Nondeterministic Functions](../../relational-databases/user-defined-functions/deterministic-and-nondeterministic-functions.md).
63
+
64
+
Operates on a set of rows. To obtain the MIN value for a set of values inline, then look at [LEAST](logical-functions-least-transact-sql.md)
0 commit comments