您好,登錄后才能下訂單哦!
#能排序就能比較,并且忽略了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;
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。