PHP and MySQL Programming/Common Functions and Operators

COUNT
mysql_query(" SELECT COUNT(*|`field_name`) FROM `table_name` ");

SUM
mysql> SELECT SUM(`field_name`) FROM `table_name`;