SQLaggregatesCOUNTSUM

What are COUNT, SUM, AVG, MIN, MAX in SQL? Aggregate functions for beginners

Aggregate functions are tools for "computing something across a group of rows". COUNT — how many rows, SUM — total, AVG — average, MIN/MAX — smallest and largest. Plain words: the difference between COUNT(*) and COUNT(column), how NULL affects aggregates, common scenarios, and pitfalls.

1 λεπτά ανάγνωσηςSQL · aggregates · COUNT · SUM · tutorial

These are the five most basic aggregate functions. They answer "how many", "how much in total", "average", "smallest", "largest" by collapsing a group of rows into a single number.

This article is currently in Russian. The full English translation is on the way.

Εξασκηθείτε σε πραγματικές ασκήσεις

Λύστε ασκήσεις στην εξάσκηση SQL με άμεση βαθμολόγηση και υποδείξεις.

Άνοιγμα εξάσκησης