집계 함수입문
COUNT
행이나 값의 개수를 세는 집계 함수
정의
왜 중요한가?
틀리기 쉬운 포인트
예시
SELECT COUNT(*) AS total_rows, COUNT(email) AS rows_with_email, COUNT(DISTINCT dept_id) AS dept_count FROM employees;
행이나 값의 개수를 세는 집계 함수
SELECT COUNT(*) AS total_rows, COUNT(email) AS rows_with_email, COUNT(DISTINCT dept_id) AS dept_count FROM employees;