Category: Aggregate Functions
-
SUM Function
The SQLite SUM function is used to return the summed value of an expression. Syntax: Syntax when you use SUM function with GROUP BY clause: Example1: We have a table named “STUDENT”, having the following data: Retrieve total fees of the students where ID is less than or equal to 5: Output: Example2: Using mathematical…
-
COUNT Function
SQLite COUNT Function is used to fetch the total count of an expression. Syntax: Syntax when you use MAX function with GROUP BY clause: Example1: We have a table named “STUDENT”, having the following data: Count all the number of students in the “STUDENT” table where AGE is greater than 22. Output: Example2: Using GROUP…
-
AVG function
SQLite AVG function is used to retrieve the average value of an expression. Syntax: Syntax when you use AVG function with GROUP BY clause: Example1: We have a table named “STUDENT”, having the following data: Retrieve the average fees of all students in “STUDENT” table. Output: Exampple2: Using DISTINCT clause with AVG function Retrieve average…
-
MAX Function
SQLite MAX function is used to fetch the maximum value of an expression. Syntax: Syntax when you use MAX function with GROUP BY clause: Example1: We have a table named “STUDENT”, having the following data: Retrieve the highest fees of the student from the “STUDENT” table. Output: Example2: Using GROUP BY clause with MAX function:…
-
MIN Function
SQLite MIN function is used to fetch the minimum value of an expression. Syntax: Syntax when you use Min function with GROUP BY clause: Example1: We have a table named “STUDENT”, having the following data: Retrieve the lowest fees of the student from the “STUDENT” table: Output: Example2: Using GROUP BY clause with MIN function:…
-
Aggregate Function
SQLite Aggregate functions are the functions where values of multiple rows are grouped together as input on certain criteria and form a single value as output. Following is a list of some SQLite Aggregate function: Index Function Description 1) SQLite MIN Function The SQLite MIN function is used to select the lowest (minimum) value for…