SQL Oracle Java JSP JDBC PHP MORE

Oracle Query for Calculate Average

The SQL AVG() function is used to calculate average of numbers.

Oracle AVG() Syntax

SELECT AVG(column_name)
FROM table_name
WHERE condition;

Oracle AVG() Example

In this example we calculate the average run of Virat kohili in 3 match.

MatchNo Name Run Wicket
1 Virat 78 1
2 Virat 82 2
3 Viart 50 0

Oracle Query

SELECT COUNT(Run)
FROM students_data;

Output

70.00