SELECT count(*) as rows, sum(scan_key) as sum_scan_key, sum(rel0) as sum_rel0, sum(rel1) as sum_rel1, sum(rel2) as sum_rel2 FROM twomass_scn; rows | sum_scan_key | sum_rel0 | sum_rel1 | sum_rel2 -------+--------------+----------+----------+---------- 59731 | 2125504036 | 82 | 2994 | 25074