AVG
AVG函数返回数值列的平均值。NULL值不包括在计算中。
语法:SELECT AVG(column_name) FROM table_name
COUNT
语法:SELECT COUNT(column_name) FROM table_name
FIRST
语法:SELECT FIRST(column_name) FROM table_name
LAST
语法:SELECT LAST(column_name) FROM table_name
MAX
语法:SELECT MAX(column_name) FROM table_name
MIN
语法:SELECT MIN(column_name) FROM table_name
SUM
语法:SELECT SUM(column_name) FROM table_name
GROUP BY
GROUP BY 语句用于结合合计函数,根据一个或多个列对结果集进行分组。
语法:SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name
HAVING
在SQL中增加HAVING子句原因是,WHERE关键字无法于合计函数一起使用。
语法:SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name HAVING aggregate_function(column_name) operator value
UCASE
UCASE 函数把字段的值转换为大写。
语法:SELECT UCASE(column_name) FROM table_name
LCASE
LCASE 函数把字段的值转换为小写。
语法:SELECT LCASE(column_name) FROM table_name
MID
MID 函数用于从文本字段中提取字符。
语法:SELECT MID(column_name, start[,length]) FROM table_name
LEN
LEN 函数返回文本字段中值的长度。
语法:SELECT LEN(column_name) FROM table_name
ROUND
NOWROUND 函数用于把数值字段舍入为指定的小数位数
语法:SELECT ROUND(column_name, decimals) FROM table_name
NOW 函数返回房前的日期和时间。
语法:SELECT NOW() FROM table_name
FORMAT
FORMAT函数用于对字段的显示进行格式化。
语法:SELECT FOTMAT(colume_name, format) FROM table_name