What are SQL Functions
What are SQL Functions
SQL Functions are built-in pieces of code that perform specific operations on your data. Instead of writing complex logic manually, you use these functions to transform data, perform calculations, or format output directly within your query.

They are generally categorized into two main groups based on how they process rows:
GROUP BY clause.SUM(): Adds up all values in a column.AVG(): Calculates the numerical average.COUNT(): Counts the number of rows or non-null values.MAX()/MIN(): Finds the highest or lowest value in a set.
- String Functions:
UPPER()(converts to uppercase),CONCAT()(joins strings),LENGTH()(gets character count). - Numeric Functions:
ROUND()(rounds decimals),ABS()(absolute value). - Date Functions:
NOW()(current date/time),DATEDIFF()(difference between two dates).