Golang Tutorials - Learn Go Programming with Easy Step-by-Step Guides

Explore comprehensive Golang tutorials for beginners and advanced programmers. Learn Go programming with easy-to-follow, step-by-step guides, examples, and practical tips to master Go language quickly.

Min Function In Sql in SQL

Min Function In Sql in SQL

? MIN() Function in SQL

The MIN() function returns the minimum (smallest) value from a set of values in a column.


? Syntax:

SELECT MIN(column_name) FROM table_name;

? Example:

SELECT MIN(salary) AS lowest_salaryFROM employees;

Result:

lowest_salary
25000

? Notes:

  • Works with numeric, date, and text (alphabetically) values.

  • Commonly used with GROUP BY to find minimum per group:

SELECT department, MIN(salary) AS min_salaryFROM employeesGROUP BY department;

? Supported in:

? MySQL, SQL Server, PostgreSQL, Oracle, SQLite, and others.


Want me to compare MIN() and MAX() or show usage in subqueries?

Disclaimer for AI-Generated Content:
The content provided in these tutorials is generated using artificial intelligence and is intended for educational purposes only.
html
docker
php
kubernetes
golang
mysql
postgresql
mariaDB
sql