> For the complete documentation index, see [llms.txt](https://docs.layraweb.com.tr/merhaba/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layraweb.com.tr/merhaba/sql-tarafi/konular/fonksiyon-konulari/aggregate-functions.md).

# Aggregate Functions

SQL'de "Aggregate Functions" (Toplama Fonksiyonları), bir sütundaki değerlerin toplamını, ortalama değerini, en küçük ve en büyük değerlerini ve diğer toplam değerlerini hesaplamak için kullanılır. Aggregate fonksiyonlar, bir sütundaki değerlerin istatistiksel analizini yapmak için kullanışlıdır.

SQL'de yaygın olarak kullanılan Aggregate fonksiyonları şunlardır:

* COUNT(): bir sütundaki değerlerin sayısını hesaplar.
* SUM(): bir sütundaki sayısal değerlerin toplamını hesaplar.
* AVG(): bir sütundaki sayısal değerlerin ortalamasını hesaplar.
* MIN(): bir sütundaki en küçük değeri hesaplar.
* MAX(): bir sütundaki en büyük değeri hesaplar.

Aggregate fonksiyonları, bir SELECT ifadesinde kullanılır ve GROUP BY ifadesiyle birlikte kullanılırsa, veriler gruplandırılabilir.

Aggregate fonksiyonları aşağıdaki şekilde kullanılır:

```sql
SELECT function(column_name)
FROM table_name
WHERE condition
GROUP BY column_name;
```

Burada "function", kullanmak istediğimiz Aggregate fonksiyonunu temsil eder. "column\_name", hesaplamak istediğimiz sütunun adıdır. "table\_name", sorgulamak istediğimiz tablonun adıdır. "condition", sorguyu filtrelemek için isteğe bağlı bir koşuldur.

Örneğin, "Orders" adlı bir tablodaki "Price" sütunundaki değerlerin toplamını hesaplamak için şu SQL sorgusu kullanılabilir:

```sql
SELECT SUM(Price)
FROM Orders;
```

Bu sorgu, "Orders" tablosundaki "Price" sütunundaki tüm değerlerin toplamını döndürür.

Aggregate fonksiyonları, veritabanı işlemlerinde oldukça yaygın olarak kullanılır. Ancak, büyük veritabanlarında kullanılırsa, sistem kaynaklarını tüketebilir. Bu nedenle, büyük veritabanları için, Aggregate fonksiyonları doğru şekilde kullanmak önemlidir.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.layraweb.com.tr/merhaba/sql-tarafi/konular/fonksiyon-konulari/aggregate-functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
