RETURN clause

RETURN indicates that the statement result should be included in the query result.

All EQL statements begin with either DEFINE or RETURN.

RETURN provides the key for accessing EQL results from the Endeca Server query result. This is important when more than one statement is submitted with the query.

The RETURN syntax is:
RETURN <recordSetName> AS ...
The following statement returns for each size the number of different values for the Color attribute:
RETURN result AS 
SELECT COUNTDISTINCT(Color) AS Total
GROUP BY Size