Write a program for Sum of a database column.

import MySQLdb

db=MySQLdb.connect(‘localhost’,’pardeep’,’pardeep321′,’temp’)
curs=db.cursor()

curs.execute(” select sum(AGE) from employee”)
p = curs.fetchone()[0]

print p