Python MySQL AVG Function

Python MySQL AVG Function:

(1) MySQL AVG( ) function returns the average of the values in a specified column. Just like the SUM function, it works only on numeric data types.

(2) We have taken a table as shown below. We implement an AVG( ) function on the student_fees table field.

Python MySQL Sum Function student table
We can use the PyCharm code editor for this example. If you do not know about it then follow this link- How to install PyCharm for Python and create a program in it.

(3) Example of AVG( ) function as shown below.

Python MySQL AVG Function Codeunit

Tutorial MySQL
Tutorial Python
Programming Languages
Procedure-Oriented Programming
Object-Oriented Programming (OOP)
Computer Software and Hardware
Malicious Software (Malware)
Database Management System (DBMS)
Python (programming language)– Wikipedia

Comments (No)

Leave a Reply