UPPER & LOWER
- in case of
UPPER
converts all letters in the specified string to uppercase. in case of LOWER
converts the string to lowercase.
SELECT 'COLUMN1', UPPER('COLUMN2') AS 'NEW_COLUMN' FROM 'TABLE';
SQRT
- returns the square root of given value in the argument
SELECT 'COLUMN1', SQRT('COLUMN2') FROM 'TABLE';
AVG
- returns the average value of a numeric column
SELECT AVG('COLUMN') FROM 'TABLE';
SUM
- calculate the sum for a column's values
SELECT SUM('COLUMN') FROM 'TABLE';
MIN
- return the minimum value of an expression in a SELECT statement.
SELECT MIN('COLUMN') AS 'NEW_COLUMN' FROM 'TABLE';
DATEDIFF
DATEDIFF('day1','day2');
TIMESTAMPDIFF
- return difference timestamp
- unit : SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR
TIMESTAMPDIFF('unit','day1','day2');