DEFINE is used to generate an intermediate result that will not be included in the query result.
All EQL statements begin with either DEFINE or RETURN.
You can use multiple DEFINE clauses to make results available to other statements. Typically, DEFINE clauses are used to look up values, compare attribute values to each other, and normalize data.
DEFINE <recordSetName> AS ...
DEFINE RegionTotals AS SELECT SUM(Amount) AS Total GROUP BY Region; RETURN ProductPct AS SELECT 100*SUM(Amount) / RegionTotals[Region].Total AS PctTotal GROUP BY Region, Product Type