Caché MultiValue Query Language (CMQL) Reference
PCT clause
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

Returns the percent of the total numeric values of a field.
Synopsis
PCT field
Description
The PCT and PERCENT keywords are synonyms.
The PCT clause calculates the percentage of the overall total for a numeric field. Fields containing nonnumeric values or NULL comprise 0 percent of the total.
Multiple CMQL clauses may be specified in any order. The order of application of CMQL clauses is always the same. The PCT clause is applied after the WITH clause, the SAMPLED clause (if present), and the SAMPLE clause (if present).
The following example returns the percent of total for each distinct F5 value. Note that non-numeric values are returned as 0%. The WITH clause eliminates records which have no value (null) for F5:
LIST VOC WITH F5 BY F5 BREAK.ON F5 PCT F5 DET-SUPP