Files
freeCodeCamp/guide/arabic/sql/sql-avg-function/index.md
2019-06-20 15:35:05 -05:00

25 lines
744 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: SQL Avg Function
localeTitle: دالة Avg SQL
---
## دالة SQL متوسط (AVG)
"Average" هي دالة تجميع (تجميع حسب). يتم استخدامه لحساب متوسط ​​عمود رقمي من مجموعة الصفوف التي تم إرجاعها بواسطة عبارة SQL.
هنا هو بناء الجملة لاستخدام الوظيفة:
```sql
select groupingField, avg(num_field)
from table1
group by groupingField
```
إليك مثال على ذلك باستخدام جدول الطالب:
```sql
select studentID, FullName, avg(sat_score)
from student
group by studentID, FullName;
```
![صورة 1](https://github.com/SteveChevalier/guide-images/blob/master/avg_function01.JPG?raw=true)