A summary value is created for each record if you include an SQL aggregate function, such as Sum or Count, in the SELECT statement.
Jeśli w instrukcji SELECT zostanie dodana funkcja agregująca języka SQL, taka jak Sum czy Count, dla każdego rekordu zostanie utworzona wartość zbiorcza.
The use of an aggregate function that considers interactions between criteria provided more reliable results than the use of a linear weighted sum.
Zastosowanie funkcji agregującej, uwzględniającej interakcje między kryteriami, dostarczyło bardziej wiarygodne wyniki niż zastosowanie liniowej sumy ważonej.
If you want to use criteria to limit your results, but the field that you want to apply criteria to is used in an aggregate function, you cannot use a WHERE clause.
Jeśli trzeba ograniczyć wyniki przy użyciu kryteriów, ale pole, do którego mają zostać zastosowane kryteria, jest używane w funkcji agregującej, nie można użyć klauzuli WHERE.
A field can be used to group data, or it can be transformed with an aggregate function to provide a measurement in data categories.
Pole może być używane w celu pogrupowania danych albo może zostać przekształcone za pomocą funkcji agregacji w celu udostępnienia pomiaru w kategoriach danych.
The WITH ROLLUP option is similar to the WITH CUBE option, but creates only one type of summary for each combination of column and aggregate function.
Opcja WITH ROLLUP jest podobna do opcji WITH CUBE, ale tworzy tylko jednego typu podsumowania dla każdej kombinacji kolumny i funkcji agregacji.
Examples of such errors include data truncation on execution of an INSERT or UPDATE statement, and encountering a null value during an aggregate function.
Do takich błędów należy na przykład obcięcie danych podczas wykonywania instrukcji INSERT lub UPDATE lub napotkanie wartości null podczas funkcji agregującej.
Note: A query can have a WHERE clause and a HAVING clause - criteria for fields that are not used in an aggregate function go in the WHERE clause, and criteria for fields that are used with aggregate functions go in the HAVING clause.
Uwaga: Zapytanie może zawierać klauzulę WHERE i klauzulę HAVING - kryteria dla pól, które nie są używane w funkcji agregującej, są umieszczane w klauzuli WHERE, a kryteria dla pól używanych w funkcjach agregujących są umieszczane w klauzuli HAVING.
For example, if you want to know how much your company spent on office furniture last year, you can add an aggregate function to the query and the sum will appear in your results.
Aby na przykład dowiedzieć się, ile firma wydała na meble biurowe w zeszłym roku, można dodać do kwerendy funkcję agregującą i w wynikach zostanie wyświetlona suma.
In the first line, you select all of the other items purchased by a user, and the aggregate function COUNT() is used to calculate the quantity of each other item purchased.
W pierwszym wierszu wybierasz wszystkie inne produkty kupione przez użytkownika, a funkcja zbiorcza COUNT() służy do liczenia innych nabytych produktów.
However, Null values are not evaluated in any SQL aggregate function.
For example, continuing the previous example, if your SELECT clause applies an aggregate function to [E-mail Address] but not to Company, your GROUP BY clause would resemble the following: GROUP BY Company
Jeśli klauzula SELECT z poprzedniego przykładu ma stosować funkcję agregującą do pól [Adres e-mail], ale nie do pól Firma, klauzula GROUP BY może wyglądać następująco: GROUP BY Company