Probable cause
You used a constant in the GROUP BY clause. Constants must not appear in the GROUP BY clause for a query. References to columns in a view that are constant are permitted in a GROUP BY clause. Also, expressions that use a view column that is constant are permitted.