大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
#能排序就能比较,并且忽略了null值
SELECT MAX(last_name),MIN(last_name),COUNT(last_name) FROM employees;
#count只能计算不为null的个数
SELECT COUNT(commission_pct) FROM employees;
#忽略了null值
SELECT SUM(commission_pct),AVG(commission_pct) FROM employees;
#与去重连用
SELECT SUM(DISTINCT salary),SUM(salary) FROM employees;#distinct去重
SELECT COUNT(DISTINCT salary) ,COUNT(salary) FROM employees;