| COMPUTE function LABEL label_name OF column column column
... ON break_column
COMPUTE执行的计算操作主要有:
SUM
Computes the sum of the values in the column.
MINIMUM
Computes the minimum value in the column.
MAXIMUM
Computes the maximum value in the column.
AVG
Computes the average of the values in the column.
STD
Computes the standard deviation of the values in the column.
VARIANCE
Computes the variance of the values in the column.
COUNT
Computes the number of non-null values in the column.
NUMBER
Computes the number of rows in the column.
下面是一个COMPUTE计算的例子。如图6

图6
COMPUTE参数的说明
¨ LABEL为计算指定一个名称。如COMPUTE SUM LABEL ‘TOTAL’ OF SAL ON JOB,那么在小计这一行,会显示TOTAL,而不是缺省的sum
不需要打印任何标签,就使用DUMMY。如图7 上一页 [1] [2] [3] [4] [5] 下一页 |