Skip to content · ⁨본문 바로가기⁩

Counting and averaging · ⁨계산 및 평균 구하기⁩

English

Summarising with aggregate functions

Sometimes you do not want the rows themselves, but a summary of them. Aggregate functions turn many rows into a single value:

  • COUNT(*) — how many rows
  • SUM(col) — the total
  • AVG(col) — the average
  • MIN(col) / MAX(col) — the smallest / largest

한국어

집계 함수로 요약하기

有时候行本身并不是我们想要的,而是它们的摘要。집계 함수는 여러 행을 단일 값으로 변환합니다:

  • COUNT(*) — 행의 개수
  • SUM(col) — 합계
  • AVG(col) — 평균
  • MIN(col) / MAX(col) — 최소 / 최대
SELECT COUNT(*) FROM student;

COUNT, SUM 및 AVG는 전체 열을 각각 단일 숫자로 축소합니다

Handout · ⁨교재 자료⁩

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP