SQL function
SQL has many built-in functions for counting and calculations.
SQL Aggregate function
SQL Aggregate function calculates the value obtained from the column and returns a single value.
Useful Aggregate functions:
AVG() - Returns the average
- ##COUNT() - Returns the number of rows
- FIRST() - Returns the value of the first record
- LAST() - Returns the value of the last record
- MAX() - Returns the maximum value
- MIN() - Returns the minimum value
- SUM() - Returns the sum
SQL Scalar functionThe SQL Scalar function returns a single value based on the input value. Useful Scalar functions:
- UCASE() - Convert a field to uppercase
- LCASE() - Convert a field to lowercase
- MID() - Extract characters from a text field
- LEN() - Return a text The length of the field
- ROUND() - Rounds a numeric field to the specified number of decimal places
- NOW() - Returns the current System date and time
- FORMAT() - Format how a field is displayed
Tip: below In the chapter, we will explain the Aggregate function and Scalar function in detail.