About 378,000 results
Open links in new tab
  1. SQL MIN () and MAX () Functions - W3Schools

    The SQL MIN () and MAX () Functions The MIN() function returns the smallest value of the selected column. The MAX() function returns the largest value of the selected column.

  2. SQL MAX Aggregate Function

    In this tutorial, you will learn how to find the maximum value in a group using the SQL MAX aggregate function.

  3. MAX (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 18, 2025 · A constant, column name, or function, and any combination of arithmetic, bitwise, and string operators. MAX can be used with numeric, char, nchar, varchar, nvarchar, uniqueidentifier, or …

  4. SQL MAX() Function - GeeksforGeeks

    Nov 22, 2025 · The SQL MAX () function helps quickly identify the highest value within any column, making it useful for summarizing and analyzing data trends. It is widely used in reports to find top …

  5. SQL MAX Examples and Use Cases - SQL Server Tips

    May 5, 2022 · Learn about the SQL MAX () function in SQL Server to find the maximum values in a result set along with several examples of using SQL MAX ().

  6. SQL MIN and MAX Functions Explained in 6 Examples

    Aug 31, 2021 · This article explains the aggregate functions MIN and MAX, how to use them, and when to use the MIN/MAX with window functions. Includes practical examples!

  7. SQL - Using MAX in a WHERE clause - Stack Overflow

    Sep 18, 2013 · An aggregate function like MAX() can't have a result returned because it hasn't even been applied to anything. That's also the reason, why you can't use aliases defined in the SELECT …

  8. Max function in SQL Server that takes two values like Math.Max in …

    It is an aggregate function so it expects a single parameter and then returns the MAX of all rows. Does anyone know how to do it my way? That's implemented in most other databases as the GREATEST …

  9. sql - MAX function without group by - Stack Overflow

    Jun 18, 2012 · As per the error, use of an aggregate like Max requires a Group By clause if there are any non-aggregated columns in the select list (In your case, you are trying to find the MAX(Num) and …

  10. SQL MAX function in non-numeric columns - Stack Overflow

    Sep 1, 2013 · The functions MAX, MIN, etc. use the lexicographic order when applied to text columns. Therefore, your MAX (type) will return 'Printer' instead of 'PC' because 'Printer' is after (greater than) …