Interview Question

What is MAX()?

MAX returns the largest non-null value.

💡 Concept ✅ Quick Revision 🗃️ SQL

Answer

MAX returns the largest non-null input value. • It works with orderable data types. • Null inputs are ignored. • With no input rows, the result is NULL.

💡 SQL Example

SELECT MAX(salary) FROM employees;

Result

72000

⚡ Quick Revision

MAX returns the largest non-null value.