PostgreSQL(通常简称为pgsql)是一种功能强大的开源对象关系型数据库管理系统
SELECT COUNT(*) FROM table_name;
SELECT COUNT(column_name) FROM table_name;
SELECT SUM(column_name) FROM table_name;
SELECT AVG(column_name) FROM table_name;
SELECT MIN(column_name) FROM table_name;
SELECT MAX(column_name) FROM table_name;
SELECT column_name, COUNT(*) FROM table_name GROUP BY column_name;
SELECT column_name, COUNT(*) FROM table_name GROUP BY column_name HAVING COUNT(*) > 10;
SELECT COUNT(*), SUM(column_name), AVG(column_name), MIN(column_name), MAX(column_name) FROM table_name;
这些聚合函数可以帮助你根据需要对数据进行统计和分析。请注意,这里给出的示例仅适用于PostgreSQL数据库。在其他数据库系统(如MySQL、SQL Server等)中,聚合函数的语法可能略有不同。