Javatpoint Logo
Javatpoint Logo

SQLite AVG function

SQLite AVG function is used to retrieve the average value of an expression.


Syntax when you use AVG function with GROUP BY clause:


We have a table named "STUDENT", having the following data:

Sqlite Avg function 1

Retrieve the average fees of all students in "STUDENT" table.


Sqlite Avg function 2

Exampple2: Using DISTINCT clause with AVG function

Retrieve average distinct fees from "STUDENT" table where FEES is greater than 10000.


Sqlite Avg function 3

Example3: Using mathematical formula with AVG function

You can use mathematical formulae to retrieve an average value according to your requirement:


Sqlite Avg function 4

Example4: Using GROUP BY clause with AVG Function

Retrieve NAME and FEES from the table and GROUP BY the result by AGE:


Sqlite Avg function 5
Next TopicSQLite Count

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA