Snowflake Vs MS-SQL - Part 120 - Aggregate functions - MIN_BY and MAX_BY
Aggregate functions - MIN_BY and MAX_BY Suppose you want to find the row containing the minimum value for a column and return the value of another column in that row. Available Data: Expected Output: MS-SQL Server You can achieve this by using built-in WINDOWS functions as below: In Snowflake, we can use a similar approach as above; however, we can use MIN_BY as follows: For more details, refer to the MIN_BY section. Yogesh Shinde LinkedInProfile <<< Back Next >>> Snowflake Vs MS-SQL - Series