max和min函数用于计算给定列的查询返回的最大值和最小值。

示例

CREATE TABLE persioninfo (c1 text PRIMARY KEY, c2 int);
INSERT INTO persioninfo (c1, c2) VALUES ('k1', 3);
INSERT INTO persioninfo (c1, c2) VALUES ('k2', 4);
SELECT min(c2), max(c2) FROM persioninfo;