1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-07-30 22:10:16 +02:00

Merge pull request #5377 from olawuwo/patch-1

Add SQL identifier to enable highlighting in snippet
This commit is contained in:
dsh
2024-05-10 12:31:10 +01:00
committed by GitHub

View File

@@ -3,7 +3,7 @@
The `AVG()` function in SQL is an aggregate function that returns the average value of a numeric column. It calculates the sum of values in a column and then divides it by the count of those values.
Syntax:
```
```sql
SELECT AVG(column_name)
FROM table_name;
```
@@ -37,4 +37,4 @@ GROUP BY CustomerID;
```
It will calculate the average quantity for each customer and display the result along with the associated customer's ID.
> Note: The `AVG()` function works only with numeric data types (`INT`, `FLOAT`, `DECIMAL`, etc.). It will return an error if used with non-numeric data types.
> Note: The `AVG()` function works only with numeric data types (`INT`, `FLOAT`, `DECIMAL`, etc.). It will return an error if used with non-numeric data types.