snowflake.snowpark.functions.max_by¶
- snowflake.snowpark.functions.max_by(col_to_return: Union[Column, str], col_containing_maximum: Union[Column, str], maximum_number_of_values_to_return: Optional[int] = None) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.47.0/src/snowflake/snowpark/functions.py#L11655-L11696)¶
Finds the row(s) containing the maximum value for a column and returns the value of another column in that row.
Example: