Instruire
Modul
Use built-in functions and GROUP BY in Transact-SQL - Training
Use built-in functions and GROUP BY in Transact-SQL
Acest browser nu mai este acceptat.
Faceți upgrade la Microsoft Edge pentru a profita de cele mai noi funcții, actualizări de securitate și asistență tehnică.
min
aggregate functionApplies to: Databricks SQL
Databricks Runtime
Returns the minimum value of expr
in a group.
min(expr) [FILTER ( WHERE cond ) ]
This function can also be invoked as a window function using the OVER
clause.
expr
: An expression of any type that can be ordered.cond
: An optional boolean expression filtering the rows used for aggregation.The result type matches the type of the argument.
Notă
For certain STRING
collations, such as UTF8_LCASE
, the result may be non-deterministic.
> SELECT min(col) FROM VALUES (10), (50), (20) AS tab(col);
10
-- The result is non-deterministic due to collation
> SELECT min(col COLLATE UTF8_LCASE) FROM VALUES ('a', 'A') AS tab(col);
a (or A)
Instruire
Modul
Use built-in functions and GROUP BY in Transact-SQL - Training
Use built-in functions and GROUP BY in Transact-SQL
Documentație
Window functions - Azure Databricks - Databricks SQL
Learn how to use window functions in the SQL language in Databricks SQL and Databricks Runtime.
count aggregate function - Azure Databricks - Databricks SQL
Learn the syntax of the count aggregate function of the SQL language in Databricks SQL and Databricks Runtime.
row_number ranking window function - Azure Databricks - Databricks SQL
Learn the syntax of the row\_number function of the SQL language in Databricks SQL and Databricks Runtime.