Query Execution Model

The five steps of a query sequence are:

  1. Execution option implementation

  2. LET and INITIALIZATION statement evaluation

  3. Minor query block evaluation

  4. FINAL and FINAL SHOW statement evaluation

  5. Report filtering

However, given that LET statements may assign a range of values to a variable, a better picture of the execution sequence can be illustrated with the following code.

Implement execution options
Evaluate the INITIALIZE statements
For each LET value.
         For each date to test
                  For each query block
                           IF the condition is true
                           THEN perform the action
         End For
End For
End For
Evaluate the FINAL statements
ImplementTOP / BOTTOM / AS_LONG_AS filters

There can be n LET statements within the second major query block, therefore for each one, a “For each LET” loop is added to the nest.

Time Offset – syntax detail

Attribute Units – syntax detail