REST returns an error when using the statistical functions in conjunction with the UPPER function in where clausure in a published service from a filegeodatabase. When used with a published service from an enterprise geodatabase the problem does not happen.
Also the problem does not happen when the upper it is used without the statistics functions.
Arcgis Server 10.11
Someone confirms the problem?