SYMPTOM:
When running a report in Strategy Desktop or Web 10.x, the following error occurs:

QueryEngine encountered error: Execute Query failed. Error type: Odbc error. Odbc operation attempted: SQLExecDirect. An aggregate cannot appear in an ON clause unless it is in a subquery contained in a HAVING clause or select list, and the column being aggregated is an outer reference.
CAUSE:
This error is due to the SQL engine attempting to add an aggregation statement within the join portion of the SQL generated, and depending on the report, on the WHERE clause too, as shown below:

For instance, a specific attribute might have been defined with an ApplySimple statement having an aggregation defined, as shown below:

ACTION:
If this attribute must be included in the report, redefine the attribute form without the aggregation, as shown below:

16484