PERCENT
Calculates the percentage of rows matching a condition.
Syntax
[
GROUP]
PERCENT(*) [
WHERE condition ]
- condition is a boolean expression evaluated to compute the aggregate value.
Usage
This aggregate report instruction returns the percentage of the total number of records qualified by
the optional WHERE
condition.
Using the GROUP
keyword causes
the aggregate instructions to include only data of the current group of records that have the same
value for the variable that you specify in the AFTER GROUP OF
control block.
This aggregate instruction makes a two-pass report when not using the GROUP
keyword and is used in any control block other than ON LAST ROW
, or when using
the GROUP PERCENT(*)
anywhere in the report.