One of my favorites languages is SQL.
Almost six years working with it… MSSQL, Oracle, Mysql, Progress doesn’t matter which.
The tip of today is how to use compute clause.
It’s very common somebody ask you the sum of a column in a select.
The compute clause might help you…
In this sample… in the end of result the sql appends a line with the total of sal column.
These r the agregate functions that you may use with compute…
AVG Average of the values in the numeric expression
COUNT Number of selected rows
MAX Highest value in the expression
MIN Lowest value in the expression
STDEV Statistical standard deviation for all values in the expression
STDEVP Statistical standard deviation for the population for all values in the expression
SUM Total of the values in the numeric expression
VAR Statistical variance for all values in the expression
VARP Statistical variance for the population for all values in the expression